Sep 14, 2018

Python infinite iterators

The itertools package comes with three iterators that can iterate infinitely. 

What this means is that when you use them, you need to understand that you will need to break out of these iterators eventually or you’ll have an infinite loop.

These can be useful for generating numbers or cycling over iterables of unknown length, for example. Let’s get started learning about these interesting iterables!

count(start=0, step=1)