My curated list of useful python 3 tricks. Helpful for coding interviews and general day to day tasks. Impress your co-workers!
Unlike online docs and other sites, I don't bloat it with too many examples or long detailed explanations (not the point of this anyway). Web pages are also distracting. Having the code snippet is short sweet and simple. Try re-writing my code samples to really drill it into your head. This is more of a reference and not great to learn python.
Each group of tips has its own folder
Note: I update this on a rolling basis once I find something interesting and worth including.
Note: This is a work in progress hence it is not complete! Below are the topics I hope to add soon.
-
The standard library or anything that you don't need to pip install
-
Standard modules that you don't need to pip install
- os
- sys
- csv
- collections
-
Non standard but popular tools, frameworks, modules
- pandas
- numpy
- pyspark
- argparse
- opencv
- requests
-
Random facts
-
Bad examples from articles
Tested with
- Python 3.8.5
some books and websites
https://realpython.com/products/python-tricks-book/
There are probably mistakes and typos in the code but all examples will run, except for the ones that intentionally throw exceptions
- add jupyter notebooks