Python’s standard interface for an iterator has two methods: __next__ Returns the next item in the series, raising StopIteration if there are no more. __iter__ Returns self; this allows iterators to be used where an iterable is expected, for example, in a for loop.