Solution Review: Create a Fibonacci Iterator
Have a look at how to create a Fibonacci Iterator.
We'll cover the following...
We'll cover the following...
Implementation
Explanation
As we learned previously, an iterator is just a class that implements the iterator protocol, i.e., a __next__ method and an __iter__ method. Therefore, we implement both of these methods on line 9 and 6, respectively.
In the __init__ method (lines 2-4), we ...