After reading this Python Iterators topic, you will know how to implement an iterator and use a loop over an iterator in Python, you will understand iterator two methods __iter()__ and __next()__, & stopiteration statement in Python.
In python, an iterator is an object and iterator object is generally associated with two methods as __iter()__ and __next()__. Lists, tuples, dictionaries, sets, etc. all are examples of iterable objects. The object said to be iterable when it gives iterator and for doing this the object used the method __iter()__. The __next()__ method is used to visit each item of lists, tuples, dictionaries, sets, etc. in python.
Continue reading Python – Iterators