ID EN
Built-in Functions

next

Python 3.11

Retrieve the next item from the iterator by calling its __next__() method. If default is given, it is returned if the iterator is exhausted, otherwise StopIteration is raised.

Syntax

PYTHON
next(iterator)

See Also

iterator __next__() StopIteration