Cast ranges to lists for python 3