Examveda

Is the following Python code valid?
>>> a,b=1,2,3

A. Yes, this is an example of tuple unpacking. a=1 and b=2

B. Yes, this is an example of tuple unpacking. a=(1,2) and b=3

C. No, too many values to unpack

D. Yes, this is an example of tuple unpacking. a=1 and b=(2,3)

Answer: Option C


This Question Belongs to Python Program >> Tuples In Python

Join The Discussion

Related Questions on Tuples in Python