I need to shuffle certain elements of a python array depending on a second array saying which indeces should be shuffled. Preferably in-place.
arr = [1,2,3,4,5,6]
indeces_to_shuffle = [0,4,5]
shuffle_algorithm(arr, indeces_to_shuffle) # Need help here!
print(arr)
> 6,2,3,4,1,5