BaseCodeByte
Back to Python course
PyValues and TypesBeginnerLive Python10 min

Variables

Store values with clear names and reuse them later.

Explanation cell

Variables store values so your program can reuse them later. In Python, you create a variable by assigning a value with the equals sign.

namesassignmentstoring values

Quick tip

Run small edits often. Tiny feedback loops make Python easier to learn.

Common mistake

Most early errors come from unmatched quotes, misspelled names or indentation.

Code cell

Starter code · Ctrl+Enter runs · Ctrl+Shift+Enter tests

Python runtime loads on first run

Output cell

Run your code to see output.

Run your code to see output.

Test cell

Tests run against the actual Python output.

Run tests to check your code against the lesson goals.

Practice cell

Try this

Create variables for your city and favorite programming language, then print them.

Expected output

Ada
28