Examveda

What will be the output of the following Python code?
print(list(zip((1,2,3),('a'),('xxx','yyy'))))
print(list(zip((2,4),('b','c'),('yy','xx'))))

A. [(1,2,3),(‘a’),(‘xxx’,’yyy’)]
[(2,4),(‘b’,’c’),(‘yy’,’xx’)]

B. [(1, 'a', 'xxx'),(2,’ ‘,’yyy’),(3,’ ‘,’ ‘)]
[(2, 'b', 'yy'), (4, 'c', 'xx')]

C. Syntax error

D. [(1, 'a', 'xxx')]
[(2, 'b', 'yy'), (4, 'c', 'xx')]

Answer: Option D


This Question Belongs to Python Program >> Lists In Python

Join The Discussion

Related Questions on Lists in Python