A variable is a name for a value. Once a value has a name, you can use it as many times as you like.
The program
python
name = "Ada" age = 25 print(f"Name: {name}, Age: {age}")
output
Name: Ada, Age: 25
How it works
name = "Ada"stores the string"Ada"under the namename. The=sign means "store", not "is equal to".age = 25stores a whole number (an int). Numbers don't need quotes.- The
fbefore the quotes makes an f-string. Python replaces{name}and{age}with the values of those variables.
Try changing it
Change a variable and print again. The new value replaces the old one:
python
name = "Ada" age = 25 age = age + 1 print(f"Next year {name} will be {age}.")
output
Next year Ada will be 26.