PY3 Use range instead of xrange