I have a list of curves, let's call them: [ C1 , C2 , C3 , C4 , C5 ] I want to sort it such that the original indices now are arranged in this new order (example) [ 3 , 1 , 4 , 2 , 5 ] i.e. the final result should be a list of the curves ordered like this: [ C3 , C1 , C4 , C2 , C5 ] The documentation of the "sort" command is quite spartan and does not offer many clues for how to do this type of operation, I also tried with an iteration loop but did not get the desired result. If