Convert ranges to lists for python 3