Examveda

The error displayed in the following Python code is?
import itertools
l1=(1, 2, 3)
l2=[4, 5, 6]
l=itertools.chain(l1, l2)
print(next(l1))

A. 'list' object is not iterator

B. 'tuple' object is not iterator

C. 'list' object is iterator

D. 'tuple' object is iterator

Answer: Option B


This Question Belongs to Python Program >> Exception Handling In Python

Join The Discussion

Related Questions on Exception Handling in Python