...

/

Untitled Masterpiece

Test yourself on iterators and generators with Python.

Quiz

1.

What will be the output of the following code snippet?

import itertools
t1=(1, 3, 6)
t2=[4, 1, 4]
t=itertools.chain(t1, t2)
print(next(t1))
A.

Syntax Error

B.

TypeError: ‘tuple’ object is not an iterator

C.

No Error

D.

AttributeError


1 / 3