Skip to content

Files

Latest commit

 

History

History
17 lines (14 loc) · 345 Bytes

PYTHON_cheatsheet.md

File metadata and controls

17 lines (14 loc) · 345 Bytes

Python Cheat Sheet

Here I add some useful python code snippets.

Get current directory of a python script

import os 
dir_path = os.path.dirname(os.path.realpath(__file__))

Upgrade pip in Windows venv

python -m pip uninstall pip setuptools
python -m pip install -U --force-reinstall pip