What is a Variable?
A variable is like a labeled box where you can store a value. The label is the variable's name, and the value inside can change as the program runs — that's why it's called a variable!

In Python, you create a variable by writing its name, followed by = and the value you want to store. This is called variable assignment.
Creating Variables in Python
# Creating variables name = "Tobi" age = 10 height = 1.2 is_student = True # Printing variables print(name) print(age)
Variable Naming Rules
Python Variable Naming Rules

Updating Variables
Variables can be updated at any point in your program. The old value is replaced with the new one.
score = 0 print(score) # Output: 0 score = 10 print(score) # Output: 10 score = score + 5 print(score) # Output: 15

In Python, you do not need to declare the type of a variable. Python automatically figures out the type based on the value you assign. This is called dynamic typing.

.webp&w=3840&q=75)
.webp&w=3840&q=75)
.webp&w=3840&q=75)
.webp&w=3840&q=75)
.webp&w=3840&q=75)