ONE LINE AT A TIME
Learn Python
A little syntax. Endless possibilities. Follow a guided path and try every example in your browser.
Your learning path
Beginner
1Your first program
5 min2A program is a set of instructions.
Variables & values
6 min3A variable gives a name to a value.
Working with data types
7 min4Numbers, text, and true-or-false values behave differently.
Operators & expressions
8 min5An expression produces a value.
Making decisions
5 min6A conditional chooses an action based on a true-or-false expression.
Repeating with loops
6 min7Loops apply the same steps to many values.
Your first function
7 min8A function packages a useful operation under a name.
Arrays & lists
8 min9A collection groups related values in a particular order.
Working with strings
5 minStrings represent text.
Intermediate
10Handling errors
6 min11Failures are part of a program, not an unusual exception to learning.
Objects & classes
7 minObjects group data with related behavior.
Advanced
12A first algorithm
8 minAn algorithm is a repeatable procedure for solving a problem.