Aug-06-2020, 07:07 PM
As a newbie, I am trying to understand the assigning multiple values using tuples. May I request one of you to help me here?
>>> a=('x','y','z')
>>> a
('x', 'y', 'z')
>>> a=(1,2,3)
>>> a
(1, 2, 3)
>>> a=(u,v,z)
Traceback (most recent call last):
File "<pyshell#26>", line 1, in <module>
a=(u,v,z)
NameError: name 'u' is not defined2nd piece:>>> a (1, 2, 3) >>> (u,v,z)=a >>> u 1 >>> v 2 >>> z 3 >>> a (1, 2, 3)What is happening here exactly?
