Python emphasizes readability and practicality with batteries‑included standard library and a rich ecosystem. Browse the topics below to learn step by step or jump to what you need.
Your first Python script with print and execution basics.
Numbers, strings, booleans, None; dynamic typing and conversions.
Assignment, naming, scope (LEGB), and references.
Conventions (UPPER_CASE) and typing.Final to indicate immutability.
if/elif/else, for, while, match (3.10+), and comprehension basics.
Ordered, mutable sequences with rich built-in methods.
Immutable ordered collections; unpacking and usage as keys.
Key–value mapping type with flexible keys and powerful APIs.
Unordered unique collections with fast membership and set ops.
def, return, defaults, *args/**kwargs, annotations, docstrings.
Small anonymous functions for simple expressions and callbacks.
Concise list construction with conditions and nesting.
defining classes, methods, attributes, and dunder methods.
Single/multiple inheritance and method resolution order (MRO).
Files as modules, directories as packages, and imports.
try/except/else/finally, raising and custom exceptions.
Reading/writing files, encodings, context managers, and modes.
Immutability, formatting, methods, and encoding awareness.
re module: compiling, matching, groups, and substitution.
Function-wrapping patterns for reuse, logging, and caching.
yield-based iteration for lazy and memory-efficient pipelines.
with statement for automatic resource management.
Optional static typing with typing module and tooling.
async/await with asyncio for concurrent I/O.
Boilerplate-free classes with dataclasses module.
Isolated dependencies with venv and workflow tips.
pip, PyPI, and modern tools like poetry/pipenv.
unittest, pytest, and common testing practices.
pdb, logging, IDE debuggers, and techniques.
Profiling, data structures, vectorization, and alternatives.