Learn Python by running it.
Short lessons with diagrams, an editor next to every example, and output right below the code. Change it, run it again, then practise — all on one page.
111 lessons · exercises with instant checks · NumPy, pandas & Matplotlib supported
# Edit me, then press Run (or Ctrl + Enter)
names = ["Asha", "Ben", "Chen"]
for name in names:
print(f"Hello, {name}!")
print("Total:", len(names), "learners")The curriculum
See every lesson →Follow the path from your first line of code to real projects — or jump straight to any topic.
Beginner
Start here. No experience needed.
Core Python
Handle errors, reuse code and work with files.
Level up
Objects, everyday tasks and your first data work.
Build & practise
Put it all together with projects and practice.
Why it is different
Your code runs on your device. Python is compiled to WebAssembly (Pyodide) and runs inside your browser tab, so there is no waiting for a server and nothing to install. It even works on a phone.
Every concept is visual first. Lists are drawn as numbered boxes, dictionaries as key → value arrows, loops and try/except as flowcharts — then you run the code that matches the picture.
Mistakes are part of the lesson. Readable tracebacks, the line highlighted in the editor, and a plain-English hint linking to a page about that error.
Popular lessons
- 1Python for LoopsA for loop runs the same block of code once for every item in a collection, giving the cu…✓
- 2Python ListsA list is an ordered, changeable collection that stores many values under one name, each …✓
- 3Python DictionariesA dictionary stores pairs of keys and values, so you can look up a value by a meaningful …✓
- 4Python FunctionsA function is a named, reusable block of code that takes inputs (arguments), does some wo…✓
- 5Python TypeError: What It Means and How to Fix ItA TypeError means Python was asked to do something with a value whose type doesn't suppor…✓
- 6Python requests: Call Web APIsThe requests library lets your Python code send HTTP requests to web servers and APIs and…✓
Python reference library
Quick answers, runnable programs and cheat sheets, all tested on Python 3.13.