Iterators in Python
Learn how to build an iterator.
We'll cover the following...
In the previous lesson, we pondered over the decency of the for loop. Now let’s unveil it and see the magic behind it.
What is an iterator?
In Python, an iterator is an object that implements the __iter__ and __next__ dunder methods.
⚙️ Note: Dunder methods are methods having two ...