Work in progress ...
There exists many available Python courses or cheat sheets on the web. But this one:
- Focuses exclusively on latest Python version (currently: 3.12)
- Is for intermediate level
- Is a mix of a course and a cheat sheet (minimal explanations - with moe details for advanced concepts)
- Uses Python type hints (strict type is enabled)
- Is fully integrated with VS Code and Jupyter (see below for the advantages)
- Is forkable, allowing you to customize it to reflect your current level of knowledge (every cheat sheet should be a snapshot of one's personal knowledge at a given time).
- Why would you use anything else than your IDE to read and write code? You get same syntax colors, same shortcuts, auto complete, type inference, linting, auto-formatting, debugging, etc.
- Unlike (most) websites or books, you can customize code snippets and make them yours, after having forked the project.
- Code snippets can be directly executed. Don't trust the code comments to know the program output.
- Possible 0-config by having an isolated installation in a dedicated Docker container (cf. below). It includes linting and type checking with Pylance, and auto-formatting with Black.
You can use this project as a foundation for your own personal cheat sheet. To do so:
- Fork this project
- Install it on your own machine using your preferred methods, or better yet, use the
.devcontainer.json
file to create a devcontainer. This approach provides a zero-configuration installation.
If you don't want to install the project, you can just read the notebooks on github.com
Since a cheat sheet is personal first, I don't expect new content to be proposed. However, if you find a mistake, something obviously missing, or anything than can help others, feel free to open an issue or a PR.
To check for content
- See each sections for content to fill (in the title, or in TODO file)
- See Python Cookbook Jupyter Notebook
- See 30 Helpful Python Snippets
- See The complet guide to Python
- See Nooby habits
To Do (features)
- Clean "don't do this" syntax
- Add screen presentation
- Add internal cross references (for example for "comprehensions" because they can be at multiple places in the sheet)
- Add a TOC to this file for easier access to sections
- Use Ruff instead of Pylance (as soon as it's compatible with Junyper)
When not using chatGPT, these projects have been referenced to create this cheat sheet: