I think xrange would make sense in this case.