Python
Language feature cheat sheet
Python 3.8
- Assignment Expressions:
if (a := method()):
Python 3.7
breakpoint()works as shortcut forimport pdb; pdb.set_trace()
Python 3.6
- String formatting:
f"Hello {var}." - secrets: secure random numbers
- Type annotations for variables
- Special type for file system paths:
os.PathLikeinstead ofstr