38 lessons · 263 hands-on minutes. Each one opens with a live editor — read, edit, run.
Write your first Python program and print to the screen.
Numbers, strings, booleans — the building blocks.
Arithmetic, powers, the math module — Python as a calculator.
Slicing, methods, and f-strings — text manipulation done right.
Make decisions and repeat yourself — but only on purpose.
Loop until a condition fails. Bail out or skip with break/continue.
Collections of things, and how to walk through them.
Carve up lists and strings with [start:stop:step].
Two more collections: tuples are fixed, sets are unique.
Key → value pairs. The most important data structure in Python.
Empty things are False. `is` vs `==`. The infamous None.
The Pythonic ways to iterate — count, pair, sequence.
Bundle up logic so you can reuse it.
Lists of dicts, dicts of lists — modelling real-world data.
Filter and transform in one line — the Pythonic way.
Functions as values. When list comprehensions feel too long.
Variable arguments and how to forward them.
Lazy iteration with `yield` — handle huge sequences in O(1) memory.
Catch what could go wrong, recover gracefully.
Acquire and release resources cleanly. The `with` block, demystified.
How Python finds code. import, from, as.
Parse and produce JSON — the universal data format.
Pattern matching for text — find, extract, validate.
Today, deltas, parsing, formatting — without losing your mind.
Three power tools from the `collections` module.
Functions that call themselves — and how to stay sane doing it.
Read and write 'files' that live in memory — perfect for browser Python.
Bundle state and behavior — the basics of OOP in Python.
Build on existing classes. When to do it (and when not to).
How `len(x)`, `x + y`, `x[0]` and `for x in obj` actually work.
Wrap functions to add behavior — logging, timing, caching.
Inner functions remember their enclosing scope. Powerful and tricky.
Optional static typing — documentation that tools can check.
Stop writing boilerplate __init__ and __repr__.
The protocol behind every for-loop. Build your own.
Concurrent code without threads. The asyncio model.
Vectorized math in Python. Auto-installs NumPy in your browser on first run.
DataFrames in your browser. Auto-installs pandas on first run.