When I first learned python, I felt that the syntax [for i in range(10)] was so powerful that I no longer had to write for loops like C. Iterators are very versatile in python, except for iterators like range, which have the huge advantage of being fast and having a very low memory footprint. More iterators are provided in python's built-in Itertools, which are efficient to use and have more elegant code.
There are 3 types of iterators available in Itertools.
I. Infinite types
Infinite types are, as the name implies, iterable all the time
Counter, two parameters to this method, iteration start value start, step value step.
Looper, a method with one argument, provides an iterable object, and then provides a loop iterator.
Repeat, this method two parameters, the first is to pass in an object, and then always repeat to return this object, followed by times is an optional parameter that indicates the number of times to repeat, the default is infinite.
II. Generation by sequence
This type is passed in a finite sequence that is transformed to return an iterator