Saturday, November 16, 2019

Multiple Assignment

Multiple Assignment


Python allows you to assign a single value to several variables simultaneously.

Example:
a=b=c=5
print(a)
print(b)
print(c)
Output:
5
5
5

No comments:

Post a Comment