Free forever with a quick email sign-in: docs-grounded Python 3.12+ mental models, custom SVG diagrams, lab-aligned exercises, and tough algorithmic challenges in one place.
Chapters
Ch 1: Python Execution & Memory Model — Why variables are labels on heap objects, how == differs from is, truthiness rules, and why mutating an alias surprises beginners.
Ch 3: Control Flow, Iteration & Loop-Else — Clean branching, structural pattern matching, enumerate/zip idioms, and the exact semantics of for...else and while...else.
Ch 4: Functions, LEGB Scope & Recursion — Parameter passing by object reference, the mutable-default-argument trap, LEGB lookup, closures, and memoized recursion.
Ch 6: Dictionaries, Sets & Hashing Contracts — Why dict and set lookups average O(1), what makes an object hashable, insertion-order guarantees, and Counter/defaultdict patterns.
Ch 7: Files, Exceptions & Context Managers — Reading and parsing text safely with pathlib and UTF-8 encoding, clean try/except/else/finally blocks, and custom exception classes.
Ch 8: Modules, Imports & Essential Stdlib — How sys.modules and sys.path resolve imports, why __name__ == '__main__' guards matter, and practical tools in itertools, math, and re.
Ch 9: OOP, Dunder Protocols & C3 MRO — Instance vs class attributes, @dataclass ergonomics, operator overloading with dunder methods, and how super() walks diamond MRO.