← All tracks
Advanced Python
AdvancedAdvanced
Iterators, generators, decorators, context managers, descriptors, protocols, metaclasses and structural pattern matching.
26 lessons 6 labs 2 projects ~16h
Prerequisites: Object-Oriented Programming
0%track
Lessons in this build
Decorators
A decorator is a callable that takes a function and returns a new function, letting you wrap behaviour around code without editing it.
interactive visualizerContext Managers & with
A context manager pairs setup with guaranteed teardown: the `with` statement runs `__enter__` before a block and `__exit__` after it, so resources like files, locks and transactions are always released — even when the block raises.
interactive visualizerWhy it matters
Interview importance 5/5 · production importance 5/5.
Recommended next
Decorators