This is very easy to do with numpy if you don't mind converting to numpy arrays:
>>> import numpy >>> vals = numpy.array(['a','b','c']) >>> idx = numpy.array([2,1,0]) >>> vals[idx] array(['c', 'b', 'a'], dtype='|S1')
To return to the list, you can:
>>> vals[idx].tolist() ['c', 'b', 'a']
source share