Built-in Functions — Python 3.14.0 documentation#next

next(iterator,/)

next(iterator, default,/)

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.

Printed 2026-06-28.

(echo:: @ )