Skip to content
Python 3 · runs in your browser

Learn Python by writing Python.

Forty lessons of read-a-little, write-a-lot. Real CPython runs inside this page through WebAssembly, so there is nothing to install and nothing to configure — and your code never leaves your machine.

This editor is live. Change it, run it.

Read the idea

Every lesson opens with a short explanation and a worked example — no video, no filler.

Write the code

A real editor sits beside the instructions. Run it as often as you like; mistakes cost nothing.

Get it checked

Hidden tests grade what you wrote and say exactly what was expected when it does not pass.

The courses

Work through them in order, or jump to whichever one you need.

beginner~6h
Python Basics
Printing, variables, decisions and loops — the foundation for everything else.
beginner~5h
Data Structures
Lists, dictionaries, sets and tuples — where the data actually lives.
intermediate~6h
Functions and Objects
Package behaviour into functions, then bundle data and behaviour into classes.
intermediate~5h
Files, Errors and Modules
Handle failure, split code into modules, and read and write real data.
advanced~7h
Data Analysis
NumPy and pandas — the tools Python is actually famous for.
advanced~7h
APIs and Async
Talk to HTTP services, then do it concurrently without losing your mind.