Python Advanced Tutorials
Where the Python track stops. The iterator and coroutine protocols underneath generators, functools and operator, serialization and its sharp edges, packaging and publishing, then NumPy, databases and a first machine learning model. Written against Python 3.12, and every code sample is executed — including the library ones.
- Python Advanced – Interview QuestionsThe questions that actually get asked, with answers that show understanding rather than recall. Mutable defaults, is versus ==, the GIL and what it does not mean, shallow copies, decorators, generators, and how to answer when you do not know.
- Python Advanced – Machine LearningA first model, end to end and actually run: load the data, split it properly, fit a classifier, and measure it with something better than accuracy. What the workflow is, what the vocabulary means, and the leakage mistake that flatters every beginner.
- Python Advanced – DatabasesTalking to a database from Python. The DB-API every driver implements, parameterised queries and the injection they prevent, transactions and context managers, connection pooling, and where an ORM earns its place.
- Python Advanced – NumPy ArraysThe array that made Python a data language. Why it is faster than a list, shape and dtype, vectorised operations instead of loops, broadcasting, boolean masks, and the view-versus-copy distinction that causes the confusing bugs.
- Python Advanced – Packaging & PublishingFrom a folder of scripts to something people can install. pyproject.toml, editable installs, why a lockfile is not requirements.txt, building a wheel, and publishing to PyPI without breaking anyone's build.
- Python Advanced – SerializationTurning objects into bytes and back. Custom JSON encoders for the types json refuses, why pickle is a remote code execution risk rather than a file format, YAML's safe_load rule, and round-tripping dataclasses without writing the mapping by hand.
- Python Advanced – functools, operator, and reduceThe functional toolkit that survives the comprehension argument: reduce where it is genuinely the right shape, partial for pre-filling arguments, cache and singledispatch, and the operator module that replaces most small lambdas.
- Python Advanced – Generators & IteratorsPast yield. The iterator protocol written out by hand, generators used as coroutines with send and throw, why contextlib turns one into a context manager, and the itertools functions worth knowing by name.