You are here : python_3Built-in Functionsnext

next() - Built-in Functions

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

next(iterator[, default])


Example


Output / Return Value


Limitations


Alternatives / See Also


Reference