Variables
6 min · Python
Store values in named boxes called variables, then reuse them.
A variable is a name that holds a value, like a labeled box. You create one with an equals sign: the name on the left, the value on the right.
Once a value is stored, you can use the name anywhere instead of repeating the value. Run this to see Python remember the name and print it back.
Numbers and combining values
Variables can hold numbers too (numbers don't need quotes). You can also print more than one thing at once by separating them with a comma — Python puts a space between them.
Your turn
Create a variable called greeting set to the text Hello there, then print it.