ID EN
Built-in Exceptions

StopIteration

Python 3.11

Raised by built-in function next() and an iterator's __next__() method to signal that there are no further items produced by the iterator.

Syntax

PYTHON
exception StopIteration

See Also

next() iterator __next__() None generator coroutine StopIteration value