Page 1 of 1

Python: Assigning One Value to Multiple Variables

Posted: Tue Nov 04, 2025 11:48 am
by The Jason

Code: Select all

# assigning-one-value-to-multiple-variables.py

a = b = c = "one of the first three letters."

# Above example shows how all three variables point to the same value.

print(f "A is {a}.")


print(f "B is {b}.")


print(f "C is {c}.")