A value can be assigned to several variables simultaneously : Variable Declaration « Language Basics « Python






A value can be assigned to several variables simultaneously

A value can be assigned to several variables simultaneously



x = y = z = 0  # Zero x, y and z
print x

print y

print z

           
       








Related examples in the same category

1.Same reference to an integer object, a string and a listSame reference to an integer object, a string and a list