Skip to content

Python Variables

Syntax

Variables in Python are used to store data values and are created by assigning a value using the = operator.

# Assigning values to variables
x = 10
y = 20.5
name = "Alice"
# Variables can change their values
x = 15