Question: is xrange faster than range?
Answer: range() can actually be faster in some scenario if you iterating over the same sequence multiple times. xrange() has to reconstruct the integer object every time, but range() will have real integer objects. The results below shows that xrange is indeed faster, but not enough to sweat over.