Python: Zero to Hero
A complete quiz-based curriculum covering Python from first principles to expert-level, production-grade knowledge. Python's simplicity hides a lot of nuance — this track is built around the surprises that trip up even experienced developers.
- Work through the parts in order; later quizzes assume comfort with core data structures and OOP from earlier parts.
- Each quiz has 20 multiple-choice questions, ordered from basic recall to edge cases to best-practice judgment calls.
- Click Show Answer only after committing to a choice — the explanations cover the underlying mechanism (mutability, the GIL, MRO, descriptor protocol), not just the right letter.
- Expect classic "wat" moments — mutable default arguments, late-binding closures, and
is vs == — turned into quiz questions.
None for Part 1. Comfort with basic programming concepts (variables, loops) helps but isn't required.
| # | Topic | Why It Matters |
|---|
| 01 | Introduction & Setup | CPython vs. other implementations and version differences (2 vs 3) shape everything downstream. |
| 02 | Variables & Data Types | Dynamic typing, object identity, and small-int caching produce classic is-vs-== gotchas. |
| 03 | Operators & Expressions | Chained comparisons, // vs /, and operator overloading via dunder methods are frequent traps. |
| 04 | Control Flow | for...else, walrus operator, and truthy/falsy rules for custom objects surprise newcomers. |
| 05 | Functions | Mutable default arguments are Python's most famous footgun. |
| 06 | Strings & Text | Immutability, encoding pitfalls, and f-string evaluation order matter in real code. |
| # | Topic | Why It Matters |
|---|
| 07 | Lists & Tuples | Shallow copies, list aliasing, and tuple immutability-of-reference-not-contents are daily bugs. |
| 08 | Dictionaries & Sets | Hashability rules and insertion-order guarantees (3.7+) affect correctness and performance. |
| 09 | Comprehensions & Generators | Lazy evaluation and comprehension scoping are common sources of subtle bugs. |
| 10 | Functional Programming | map/filter/reduce, lambda limitations, and functools are idiomatic in data-heavy code. |
| 11 | Closures & Decorators | Late-binding closures in loops and decorator argument order are classic interview gotchas. |
| # | Topic | Why It Matters |
|---|
| 12 | Classes & Objects | Class vs. instance attributes and mutable class-level defaults cause shared-state bugs. |
| 13 | Inheritance & Polymorphism | Method Resolution Order (MRO) and super() in multiple inheritance are frequently misunderstood. |
| 14 | Magic Methods & Protocols | __eq__/__hash__ consistency and operator dunders define how objects behave idiomatically. |
| 15 | Properties & Descriptors | The descriptor protocol underlies @property, ORMs, and much of Python's "magic." |
| # | Topic | Why It Matters |
|---|
| 16 | Error Handling | Bare except, exception chaining, and finally-with-return interactions cause silent bugs. |
| 17 | Modules & Packages | Circular imports and __init__.py semantics are frequent real-world stumbling blocks. |
| 18 | File I/O & Serialization | Context managers, encoding defaults, and pickle security risks matter in production. |
| 19 | Iterators & Context Managers | The iterator protocol and __enter__/__exit__ exception suppression are easy to misuse. |
| 20 | Type Hints & Typing | Optional, generics, and runtime-vs-static-only enforcement are widely misunderstood. |
| # | Topic | Why It Matters |
|---|
| 21 | Concurrency: Threading & Multiprocessing | The GIL means threads don't parallelize CPU-bound work — a top source of design mistakes. |
| 22 | Async/Await | Blocking calls inside async def silently kill concurrency without raising an error. |
| 23 | Metaprogramming | Metaclasses, __init_subclass__, and dynamic attribute access power frameworks like Django. |
| # | Topic | Why It Matters |
|---|
| 24 | Testing | Fixture scope, mocking pitfalls, and parametrization determine test suite trustworthiness. |
| 25 | Packaging & Virtual Environments | Dependency resolution and pyproject.toml conventions are essential for shipping real projects. |
| 26 | Performance & Optimization | Profiling before optimizing, and knowing where CPython is slow, prevents wasted effort. |
| 27 | Security | eval/pickle risks and injection vectors are the most common Python vulnerabilities. |
| 28 | Exercises & Projects (Capstone) | A mixed-review capstone spanning generators, decorators, OOP, and concurrency. |