REF use range() in the python 3 way