Home / Python / Basics

Variables

A variable is a name that points to a value. You create one by assigning with =. Python works out the type by itself, and you can reuse the name later in a condition.

age = 30
name = "Asha"
age = age + 1
print(name, age)

Test yourself on this