Python Function Reference

next
Retrieve the next item from the iterator by calling its __next__() method.
Python 3.13
next(iterator, default=None)
iterator
The iterator.
default
Default value on StopIteration.
Examples
Python 3.13
>>> it = iter([1])
>>> next(it)
1