removing xrange, using range as in python3