I've got a list of objects:
array = [object0,object1,object2,object3,object4]
and i want to change the order of the items given a permutation:
permutation = [ 2 , 4 , 0 , 1 , 3 ]
Is there a command in python that will do something like:
result = Permute(array,permutation)
result = [object2,object4,object0,object1,object3]
I know i can do it with a simple for
loop....