Basics
The concepts you need before patterns make sense in Python.
Interpreter and bytecode
CPython compiles .py files to bytecode and interprets it. Everything, including functions and classes, is an object.
print("Hello, patterns!")Dynamic typing with hints
Types are checked at runtime; annotations (def f(x: int) -> str) are checked by tools like mypy or pyright, not by the interpreter.
Data structures
list, tuple, dict and set cover most needs; comprehensions build them concisely.
Iterators and generators
yield produces values lazily, so pipelines can process large data with little memory.
Environments and packages
Isolate dependencies per project with venv (or uv / Poetry) and install from PyPI with pip.
Saved in this browser only. Part of Clean code foundations (0/5).