If I do the following: a = range(9) for i in a: print(i) # Must be exhausted by now for i in a: print(i) # It starts over! Python's generators, after raising StopIteration, normally stop looping. How then is range producing this pattern - it restarts after every iteration. Continue reading...