Why is there no xrange function in Python3?
Some performance measurements, using timeit instead of trying to do it manually with time. First, Apple 2.7.2 64-bit: In [37]: %timeit collections.deque((x for x in xrange(10000000) if x%4 == 0), maxlen=0) 1 loops, best of 3: 1.05 s per loop Now, python.org 3.3.0 64-bit: In [83]: %timeit collections.deque((x for x in range(10000000) if x%4 == … Read more