Change `xrange` to `range` for Py3k compatibility.