Skip to content
Python 3 · runs in your browser

Learn Python by writing Python.

108 lessons of read-a-little, write-a-lot, every one of them free. 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.

Download on theApp Store

On iPhone or iPad? The same lessons work offline in the app.

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.
advanced~6h
LLM APIs and Prompting
Call a model from Python, and pay attention to what it costs and how it fails.
advanced~6h
Structured Output and Tool Calling
Make the model answer in a shape your code can rely on — then let it act.
advanced~7h
Embeddings and Vector Search
Turn meaning into geometry, then find the right passage twice over.
advanced~7h
RAG Systems
Ground a model in your own documents, and know when not to answer.
advanced~7h
Agents and Tool Use
A loop with a model in it — and every guard that keeps it from running away.
advanced~6h
Evals and Shipping
Prove the prompt still works, then make it fast enough to live with.