Examveda

Is the following Python code valid?
>>> a=(1,2,3)
>>> b=('A','B','C')
>>> c=tuple(zip(a,b))

A. Yes, c will be ((1, 'A'), (2, 'B'), (3, 'C'))

B. Yes, c will be ((1,2,3),('A','B','C'))

C. No because tuples are immutable

D. No because the syntax for zip function isn't valid

Answer: Option A


This Question Belongs to Python Program >> Tuples In Python

Join The Discussion

Related Questions on Tuples in Python