Python lets you assign more than one variable in a single line. There are two different forms.
The program
python
x = y = z = 100 a, b, c = 1, 2, 3 print(x, y, z) print(a, b, c)
output
100 100 100 1 2 3
How it works
x = y = z = 100gives the same value to all three names.a, b, c = 1, 2, 3gives a different value to each name, in order. The number of names on the left must match the number of values on the right.print()with several values separates them with a space.
When the counts don't match
python
try: a, b = 1, 2, 3 except ValueError as error: print(error)
output
too many values to unpack (expected 2)
The ValueError: too many values to unpack page explains this error in detail.