Use xrange in Python 2