Roadmaps › Python
Python Roadmap
Learn Python step by step — 153 free lessons with spaced repetition and active recall on RetainHQ, so what you study actually sticks.
Lessons
- ABC Module and Abstract Methods
- *args and **kwargs
- Assertions and pytest.raises
- Async context managers
- Black: auto-formatting
- Branching strategies: feature, main, release
- break, continue, loop else clause
- __call__: Making Objects Callable
- Class Creation and Instantiation
- Class decorators
- Closure Mechanics
- Closures
- Time Complexity of Collection Operations
- Concurrency vs Parallelism
- conftest.py: shared fixtures
- contextlib.contextmanager decorator
- Conventional commits spec
- Coroutines, async / await
- collections.Counter
- cProfile for performance profiling
- CSV files with the csv module
- Custom exception classes
- Custom Iterator Class
- @dataclass Basics
- field() and default_factory
- Dataclasses vs Pydantic
- Decorator Factories with Arguments
- Function Decorators
- collections.defaultdict
- Dependency isolation strategies
- collections.deque
- Dictionary and set comprehensions
- Dictionaries: operations and use cases
- Dependency Inversion Principle
- python-dotenv for .env files
- Duck Typing
- Dynamic typing and type()
- else and finally blocks
- __enter__ and __exit__
- Loop idioms: range, enumerate, zip
- os.environ and Environment Variables
- Everything is an object in Python
- Exception chaining with raise from
- Factory pattern
- Reading and writing files with open()
- First-class functions: passing and returning functions
- Fixtures and fixture scope
- Frozen Dataclasses
- Defining functions and return values
- functools: lru_cache, partial, reduce
- functools.wraps and preserving metadata
- Garbage Collection and Cyclic References
- Generator expressions vs list comprehensions
- Generator send() for Two-Way Communication
- Generic Types
- if/elif/else and Python truthiness
- Single inheritance and super()
- __init__ and __new__
- Instance variables vs class variables
- Interface patterns in Python
- Integer and String Interning
- is vs == : Identity vs Equality
- Interface Segregation Principle
- iter() and next() builtins
- __iter__ and __next__
- The Iterable Protocol
- Iterator Protocol and StopIteration
- itertools essentials
- JSON serialization with the json module
- Keyword-only and positional-only parameters
- Lambda functions and when to use them
- Late Binding Closures Gotcha
- Layered architecture
- Lazy Evaluation and Memory Efficiency
- __len__, __getitem__, __setitem__
- Lexical Scope and Free Variables
- List Comprehensions
- Lists: indexing, slicing, methods
- Log Rotation with RotatingFileHandler
- Loggers, Handlers, and Formatters
- Logging levels and basicConfig
- for and while loops
- Liskov Substitution Principle
- match-case statement
- Method Overriding
- Instance, Class, and Static Methods
- Mocking external API calls
- Modular design and separation of concerns
- MRO: Method Resolution Order (C3 linearization)
- Multiple Inheritance & The Diamond Problem
- Multiprocessing for CPU-bound work
- Mutable default argument pitfall
- Mutable vs immutable objects
- Mypy: static type checking
- Nested comprehensions
- Object identity: id() and memory references
- Observer pattern
- Open/Closed Principle
- Operator Overloading: __add__, __eq__, __lt__
- Optional and Union Types
- Package structure and __init__.py
- patch as decorator and context manager
- pathlib for filesystem paths
- pdb and breakpoint()
- Poetry: dependency management basics
- __post_init__ Processing
- Pre-commit hooks setup
- Primitive types: int, float, bool, str
- Property Decorator
- Structural Subtyping with Protocols
- Provider abstraction pattern
- Pull request workflow
- pyproject.toml and project metadata
- @pytest.mark.parametrize
- Raising exceptions with raise
- Reading stack traces
- Rebase vs merge
- Reference Counting in CPython
- Regular expressions with re
- Ruff: linting and import sorting
- LEGB rule: variable scope in Python
- Service-repository pattern
- Sets: operations and use cases
- Shallow vs Deep Copy
- Singleton pattern
- Slicing lists & strings
- __slots__ for Memory Optimization
- Sorting with sorted and key=
- Single Responsibility Principle
- Stacking Multiple Decorators
- Stateful Functions Using Closures
- __str__ vs __repr__
- Strategy pattern
- Strings & string methods
- Structured Logging with JSON
- Ternary expressions
- Test discovery and naming conventions
- asyncio and the event loop
- The GIL (Global Interpreter Lock)
- Threading for I/O-bound work
- Threading vs Multiprocessing
- try/except with specific exception types
- Tuples: immutability and use cases
- TYPE_CHECKING for Avoiding Circular Imports
- Type conversion: implicit vs explicit casting
- Basic Annotations
- Protocols for Structural Typing
- TypeVar and Generic Functions
- unittest.mock: Mock and MagicMock
- When async actually helps
- The 'with' Statement and Resource Management
- yield from and generator delegation
- yield keyword and generator functions