Python Learning Roadmap
Complete Python learning path covering all 38 topics across 9 stages — from syntax and data structures through functions, OOP, concurrency, testing, and production best practices. Each stage builds on the previous; estimated times include focused study with hands-on practice.
info
Core language syntax — variables, types, conditionals, loops, and basic I/O. Every Python developer starts here.
Python overview, interpreter, REPL, running scripts, PEP 8 philosophy, the Zen of Python, and setting up your environment.
Dynamic typing, int/float/str/bool/NoneType, variable naming conventions, multiple assignment, type() and isinstance(), id() and memory references.
String literals, indexing/slicing, immutability, f-strings, format(), split/join, strip/find/replace, raw strings, and Unicode handling.
int vs float, arithmetic operators, floor division vs true division, pow() and math module, decimal.Decimal, fractions.Fraction, complex numbers, operator precedence.
bool type, truthy/falsy values (0, None, empty collections), if/elif/else, ternary expressions, short-circuit evaluation (and/or), comparison chaining, match/case (3.10+).
for loops over iterables, range(), while loops, break/continue/else on loops, enumerate(), zip(), loop comprehensions, infinite loop prevention, pass statement.
Python's built-in collection types — lists, tuples, dicts, and sets. Master the data structures that power every Python application.
Mutable vs immutable, ordered vs unordered, sequence types, hashable types, Big-O performance characteristics, and choosing the right structure.
List creation, indexing/slicing (including step and negative indices), append/extend/insert/pop/remove, list.sort() vs sorted(), list comprehensions, nested lists, array vs list.
Tuple creation, immutability guarantees, namedtuple, tuple unpacking, _ operator in unpacking, tuples as dictionary keys, when to prefer tuples over lists.
Dict literals, key-value semantics, dict comprehensions, get()/setdefault()/defaultdict/Counter, dict ordering (3.7+), merging (| operator, 3.9+), view objects.
Set literals, frozenset, set comprehensions, union/intersection/difference/symmetric_difference, subset/superset checks, deduplication, membership testing performance.
Write reusable, composable code with functions, lambdas, modules, and the vast Python standard library.
def statement, parameters vs arguments, default values, keyword-only and positional-only args (/ and *), *args/**kwargs, return semantics, annotations, docstrings, recursion and stack limits.
lambda expressions, map/filter/reduce, functools.partial, operator module, itertools (chain, cycle, product, permutations, groupby), and when lambdas help vs hurt readability.
import mechanics, sys.path, __name__ == '__main__' guard, relative vs absolute imports, __init__.py, namespace packages, circular import prevention, __all__.
Essential stdlib modules: os, sys, pathlib, json, csv, re, collections, datetime, math, random, statistics, argparse, subprocess, tempfile, and shutil.
Pythonic iteration patterns — comprehensions for concise construction, generators for memory-efficient lazy evaluation.
List, dict, and set comprehensions, nested comprehensions, conditional filtering, generator expressions (lazy vs eager), readability guidelines, and performance trade-offs.
yield statement, generator functions vs generator expressions, send()/throw()/close(), yield from, infinite sequences, coroutine basics, lazy evaluation for large datasets.
Robust code with proper exception handling, file operations, and resource management via context managers.
try/except/else/finally, exception hierarchy (BaseException → Exception → specific), raising with raise/from, custom exceptions, assertion, logging exceptions, traceback module.
open() modes (r/w/a/b/+), text vs binary mode, pathlib.Path for modern I/O, read()/readlines()/write(), seeking, tempfile, file encoding, large file streaming.
with statement, context manager protocol (__enter__/__exit__), contextlib.contextmanager decorator, contextlib.suppress, contextlib.redirect_stdout, building custom context managers.
Python's class system — from basic instances to magic methods, inheritance, data classes, and properties.
class statement, __init__ vs __new__, self, instance/class/static methods, class variables vs instance variables, __slots__ for memory optimization, namedtuple alternative.
__str__/__repr__, __eq__/__hash__, __lt__/__gt__ for sorting, __len__/__getitem__ for sequences, __call__ for callables, __enter__/__exit__, __iter__/__next__, __bool__.
Single inheritance, super(), MRO (C3 linearization), multiple inheritance, mixins, abstract base classes (ABC), @abstractmethod, duck typing, isinstace() vs type().
@dataclass decorator, field() with default/factory/repr/compare/hash, frozen=True for immutability, __post_init__ validation, dataclasses.asdict/astuple, slots in dataclasses (3.10+).
@property decorator, getter/setter/deleter patterns, computed attributes, cached_property, descriptors protocol (__get__/__set__), __set_name__, property vs descriptor use cases.
Deep Python internals — decorators, metaclasses, and type hints for large-scale, type-safe applications.
Decorator fundamentals, @wraps and functools.wraps, decorators with arguments, class-based decorators, stacked decorators, builtin decorators (@staticmethod, @classmethod, @property).
type as a metaclass, __metaclass__, custom metaclasses for class validation, singleton/registry patterns via metaclasses, __init_subclass__, when (not) to use metaclasses.
Type annotations for variables/parameters/returns, typing module (Optional, Union, List, Dict, Tuple, Any), Generic types, TypeVar, Protocol for structural typing, @overload, static analysis with mypy/pyright.
Handle multiple tasks simultaneously — threading for I/O, asyncio for async, and multiprocessing for CPU-bound work.
Concurrency vs parallelism, GIL explained, I/O-bound vs CPU-bound, choosing the right model (threading vs asyncio vs multiprocessing), race conditions and synchronization primitives.
threading.Thread, daemon threads, Lock/RLock/Semaphore/Event/Condition, thread pools (concurrent.futures.ThreadPoolExecutor), GIL limitations, thread-safe queues (queue.Queue).
async/await syntax, coroutines and tasks, asyncio.run(), event loop, gather/create_task/wait, asyncio.Lock/Queue/Semaphore, async context managers, aiohttp/aiofiles, async comprehension.
Process vs thread, multiprocessing.Process, Pool for parallel map, shared memory (Value/Array), Manager for shared state, Queue/Pipe for IPC, concurrent.futures.ProcessPoolExecutor.
Production-ready Python — testing, packaging, virtual environments, linting, and ecosystem best practices.
unittest.TestCase vs pytest, pytest fixtures and conftest.py, parametrize, mocking (unittest.mock/patch), coverage with pytest-cov, TDD workflow, test organization.
pyproject.toml (PEP 621), setuptools vs poetry/flit, building wheels, sdist vs wheel, versioning (__version__), publishing to PyPI, entry points and console scripts.
PEP 8 compliance, ruff/flake8 for linting, black for formatting, isort for imports, pyright/mypy for type checking, pre-commit hooks, configuration in pyproject.toml.
venv, virtualenv, pip, requirements.txt vs pyproject.toml, pip freeze, conda environments, uv/rye as modern alternatives, .venv best practices and .gitignore.
Master the Python ecosystem with regex, logging, and battle-tested patterns for production applications.
re module, raw strings, match/search/findall/finditer/sub/split, groups and named groups, lookahead/lookbehind, flags (IGNORECASE, MULTILINE, DOTALL), performance and compilation.
logging module hierarchy (DEBUG/INFO/WARNING/ERROR/CRITICAL), Logger/Handler/Formatter/Filter, logging to file vs stdout, structured logging (JSON), rotation, context logging with LogRecord.
SOLID principles in Python, dependency injection, repository pattern, configuration management, secrets handling, logging patterns, error boundary strategies, and project structure conventions.