Python
A beginner to advanced Python library: names and mutability, built-in data structures and their internals, closures, decorators and generators, OOP and the data model, CPython internals, the GIL and free-threading, threads, processes and asyncio, NumPy and pandas, typing and modern tooling, and an interview playbook.
Start here for Python prep, from "why did my default list keep growing" to "why is my FastAPI service stalling with idle CPUs". Each page teaches the language the way interviews probe it: what the code does, why CPython behaves that way, and what to use in production. Every predict-the-output answer and internals fact was checked on CPython 3.14, and recent changes (free-threaded builds, the JIT, t-strings, deferred annotations, subinterpreters, uv) are included where they matter.
- 01Python Fundamentals
Core Python language notes: how Python runs, names and objects, mutability, numbers, strings, truthiness, control flow, match statements, exceptions, and the everyday idioms interviewers expect you to know.
Beginner - 02Data Structures and the Standard Library
Python built-in collections in depth: list, tuple, dict, and set internals and time complexity, comprehensions, sorting, the collections module, heapq, bisect, itertools, and the idioms that make Python fast for coding interviews.
Beginner to midTable of Contents1. Choosing a Collection2. list: A Dynamic Array3. tuple and Named Tuples4. dict: A Compact Hash Table5. set and frozenset6. Time Complexity Cheat Sheet7. Comprehensions and Generator Expressions8. Sorting9. The collections Module10. heapq: Priority Queues11. bisect: Binary Search on Sorted Lists+3 more - 03Functions, Closures, Decorators, and Generators
Python functions in depth: parameter kinds, *args and **kwargs, LEGB scope, closures, first-class functions, decorators with and without arguments, iterators and the iteration protocol, generators, yield from, context managers, and the functools toolkit.
Mid - 04OOP and the Data Model
Object-oriented Python: classes and instances, class vs instance attributes, methods, properties, dunder methods and the data model, inheritance, super and the MRO, abstract base classes, protocols, dataclasses, slots, descriptors, metaclasses, and enums.
Mid to advancedTable of Contents1. Classes and Instances2. Class vs Instance Attributes3. Instance, Class, and Static Methods4. Encapsulation and Properties5. Dunder Methods and the Data Model6. Inheritance, super, and the MRO7. Abstract Base Classes and Protocols8. Dataclasses9. slots10. Descriptors and Attribute Lookup11. Metaclasses and Class Creation+3 more - 05CPython Internals and Performance
How CPython really works: the object model, bytecode and the specializing interpreter, reference counting, immortal objects, the cyclic and incremental garbage collector, pymalloc, interning and caches, the GIL, free-threaded Python, the JIT, subinterpreters, and practical profiling and optimization.
Advanced - 06Concurrency and asyncio
Concurrency in Python: choosing between threads, processes, asyncio, and subinterpreters, the threading and multiprocessing modules, concurrent.futures, locks and queues, the asyncio event loop, coroutines, tasks, TaskGroup, timeouts, cancellation, blocking-call pitfalls, and production patterns.
Mid to advancedTable of Contents1. Concurrency vs Parallelism2. Choosing a Model3. threading4. Synchronization Primitives5. multiprocessing6. concurrent.futures7. asyncio: The Mental Model8. Coroutines, Tasks, and Awaitables9. Running Things Concurrently10. Timeouts and Cancellation11. Blocking Code in Async Programs+3 more - 07NumPy and the Data Stack
NumPy for interviews and real work: the ndarray memory model (dtype, shape, strides), vectorization and ufuncs, broadcasting rules, basic vs fancy indexing, views vs copies, axis reductions, reshaping, dtype promotion in NumPy 2, the random Generator API, performance, and a tour of pandas 3, Polars, and Numba.
Mid - 08Typing, Tooling, and Modern Python
Type hints from basics to generics, Protocols, TypedDict, TypeIs, and PEP 695 syntax, runtime validation with Pydantic, virtual environments and packaging with pyproject.toml and uv, linting with Ruff, testing with pytest, logging, and a feature map of Python 3.8 to 3.14.
Mid - 09Python Interview Playbook
Python interview rehearsal: what each level is expected to know, a 55-question bank with strong-answer checklists, 20 predict-the-output puzzles with explanations, live-coding tasks, production scenarios, cheat sheets, common mistakes, and a 7-day study plan.
All levels
Reading Path
Pick Your Level
| You are | Read in this order |
|---|---|
| New to Python or coming from another language | Fundamentals, Data Structures, Functions |
| Using Python for DSA rounds | Data Structures and its DSA templates, then the output puzzles in the Playbook |
| Preparing for a backend role | Add OOP, Concurrency and asyncio, and Typing and Tooling |
| Preparing for a data or ML role | Add OOP and NumPy and the Data Stack |
| Preparing for senior or platform roles | Add CPython Internals |
| One week left | The Interview Playbook study plan |
Related Sections
- DSA covers the patterns; this section covers the Python tools to implement them.
- OOPS covers language-neutral principles and design patterns.
- Java is useful for contrasting typing, concurrency, and memory models.
- Operating Systems explains the threads, processes, and epoll underneath Python concurrency.
- Backend covers building the services these tools run in.