Python tutorials
87 articles · page 5 of 5Hand-written tutorials, ordered as a recommended learning path.
- 81 Generators & yield Understand Python generators from the ground up — how yield turns a function into an iterator, lazy evaluation, generator expressions, and when generators beat lists.
- 82 List Comprehensions Go beyond the basics of Python list comprehensions — filtering, nested loops, conditional expressions, dict and set comprehensions, and when a plain for loop is the better choice.
- 83 Type Hints A practical introduction to Python type hints — basic syntax, common collection types, Optional and Union, type-checking with mypy, and how hints improve code without changing runtime behaviour.
- 84 Virtual Environments Stop polluting your system Python — a practical guide to virtual environments with venv, activating and deactivating them, requirements.txt, and a quick look at modern alternatives.
- 85 asyncio Basics A practical introduction to Python asyncio: the event loop, async/await, asyncio.run, gather, create_task, and when to pick async over threads.
- 86 Regex Basics A practical introduction to Python regex with the re module: match, search, findall, sub, groups, named groups, raw strings, and compiling patterns for speed.
- 87 Threads vs Processes Understand the Python GIL and pick the right concurrency tool: when threads help with I/O, when processes help with CPU, and how to use concurrent.futures.