Change from xrange() to range()

Doesn't much matter for this in terms of performance, and xrange is gone in
py3.