project_name = "Python Field Guide"
year = 2026
is_active = True
print(project_name, year, is_active)Python Field Guide 2026 True
A variable is a name that refers to a value.
project_name = "Python Field Guide"
year = 2026
is_active = True
print(project_name, year, is_active)Python Field Guide 2026 True
values = {
"text": "hello",
"integer": 10,
"decimal": 3.14,
"boolean": True,
"nothing": None,
}
for name, value in values.items():
print(name, type(value).__name__)text str
integer int
decimal float
boolean bool
nothing NoneType
language = "Python"
units = 23
summary = f"This guide contains {units} units about {language}."
print(summary)This guide contains 23 units about Python.
= assigns a value; == compares values.