Python curriculum
Python
12 lessons ready
A friendly first language: variables, loops, functions, files and OOP.
Beginner
Hello, Python
Run your first Python program and learn how print works. No installation needed.
6 minFree preview
Variables
Give names to values so you can reuse and change them.
6 minFree preview
Data types
Integers, floats, strings and booleans, and how to convert between them.
7 min Account
Making decisions with if
Run code only when a condition is true, using if, elif and else.
7 min Account
Loops
Repeat actions with for and while, and use range to count.
8 min Account
Intermediate
Functions
Name and reuse blocks of code with parameters, default values and return.
8 min Account
Lists, dicts and sets
Python's built-in collections: ordered lists, key-value dictionaries and unique sets.
9 min Account
File handling
Read and write text files safely with open and the with statement.
8 min Account
Advanced
Object-oriented programming
Classes, objects, methods, __init__ and inheritance: model real things in code.
10 min Account
Error handling
try, except, else, finally and raise: handle problems gracefully and raise your own.
8 min Account
Modules and packages
Import code from the standard library and from your own files, and organise projects.
9 min Account
Virtual environments
Isolate each project's dependencies with venv and pip, and record them in requirements.txt.
8 min Account