Python has a lot of built-in tools that allow us to iterate and transform data. A great example is the itertools
module, which offers several convenient iteration functions. Each of these iterator-building functions (they generate iterators) can be used on their own, or combined.
The module was inspired by functional languages such as APL, Haskell and SPL and the elements within itertools
form Python’s iterator algebra.
…
#python #python's itertools #count() #count(), cycle() and chain() #python's itertools – count(), cycle() and chain() #chain()