Nov-07-2019, 08:57 PM
(This post was last modified: Nov-07-2019, 08:58 PM by Gribouillis.)
StopIteration
is the normal exception sent by an iterator at the end of its iteration. For example>>> L = [1, 2, 3] >>> effect = iter(L) >>> next(effect) 1 >>> next(effect) 2 >>> next(effect) 3 >>> next(effect) Traceback (most recent call last): File "<stdin>", line 1, in <module> StopIterationIt means that the iterable 'effect' was exhausted.