This is fine, `range` in 3 behaves like `xrange` in 2. If you want something to behave like `xrange`, you can import this `xrange`, and it works for 2 and 3 (see L95 for Python 3 definition).