EasyOutput prediction

iter() and next() on a list

What does this code print?

nums = [10, 20, 30]
it = iter(nums)
print(next(it))
print(next(it))

← → arrow keys to navigate

Sign in to save your progress.

iter() and next() on a list - Python Iterators & Generators Quiz | Unnested