Python 3 Tutorial · Chapter 6 of 22
Python Variables
Store values that can change while the program runs.
Assign with =, for example: score = 90
Choose clear names: score, age, and total are better than a, b, and x for beginners.
Variable sample
Try it Yourself »
age = 18
print("Age:", age)
Classroom Tips
- Python types are dynamic, but keep types consistent in one program.
- Reassigning a name replaces the previous value.