The protocol from the last lesson is only two methods, so you can make any of your own classes work in a for loop, with list(), with sum() and with everything else that expects an iterable. This lesson builds an iterator class, separates the thing you loop over from the thing that does the stepping, and ends with iterators that never finish.
More lessons in Complete Python Programming