Skip to content

Python Guides

Seventeen guides, each structured the same way: Learn for tutorials, Recipes for task-focused how-tos, Reference for lookups, and Concepts for short explanatory essays. Every tutorial's code cells can be edited and run directly on the page.

If you're working through Python for the first time, a sensible sequence is:

  1. Conditional logic — how programs make decisions.
  2. Data structures — lists, tuples, dictionaries, sets.
  3. CollectionsCounter, defaultdict, deque, and namedtuple from the standard library.
  4. Functions — defining, calling, and composing.
  5. Classes and objects — bundling state and behaviour.
  6. String processing — working with text.
  7. Numbers and maths — numeric types, floating point, Decimal, and the maths modules.
  8. Dates and timesdatetime, parsing, and time zones.
  9. Type hints — annotations and static type-checking.
  10. Iterators and generators — lazy pipelines and the iteration protocol.
  11. File handling — reading and writing data.
  12. Error handling — exceptions and failure modes.
  13. Logging and debugging — making programs observable.
  14. Regular expressions — pattern matching for text.
  15. Unit testing — proving your code works.
  16. Concurrency — threads, processes, and async/await for work that waits or computes.
  17. Packages and packaging — modules, imports, virtual environments, and shipping your code.

If you're here for a specific topic, pick any guide and dive in — they're self-contained.