Skip to content
Quiz · Modules, files and generators · lesson 8 of 12

Quiz — next()

What does the program print?

Python
it = iter([1, 2])
print(next(it), next(it), next(it, "end"))

Subscribe to take the course

The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.

Sign in another way