Skip to content

Chapter 4: Variables

Variables store information that can be used and manipulated in a program. In Python, you assign a value to a variable using the = sign.

Python
1
2
3
name = "Alice"
age = 30
height = 5.7

Here, name, age, and height are variables storing a string, an integer, and a float, respectively.