How-To

XCODX · How-To Guides

Python How-To Guides

Practical, runnable how-to guides for common Python tasks.

All Python how-to guides pages

Practical Python how-to guides: each one takes a single task and shows the clearest correct way to do it, the common mistakes to avoid, and code you can run and adapt.

Pick a task below, or run any solution in the Python online compiler.

Frequently asked questions

What kind of Python tasks are covered?
Common, practical Python tasks — sorting lists, and more as the section grows — each with the idiomatic Python 3 solution and its gotchas.
Which Python version do these guides use?
Modern Python 3. Where behaviour changed between versions, the guide notes it.