Quiz Yourself on the Iterators Module

Test yourself on the itertools module in Python.

Quiz

1

What will be the output of the following code?

from itertools import count
for i in count(10):
   if i > 20:
       print(i)
A)

0,1,2,3,4,5,6,7,8,9

B)

1,2,3,4,5,6,7,8,9,10

C)

Infinite loop

D)

20,19,18,17,16,15,14,13,12,11

Question 1 of 40 attempted

Get hands-on with 1400+ tech skills courses.