I have a list like the following in Python:
["Apple", "Banana", "Coconut", "Durian", "Elderberry", "Fig", "Guava"]
My goal is to shuffle the list so that certain elements are shuffled while others are left in their original place.
For instance, if the 0th, 1st, 2nd, 4th, and 6th elements are to be shuffled, a possible result of the shuffle would be:
["Elderberry", "Banana", "Apple", "Durian", "Guava", "Fig", "Coconut"]
How can I go about this? random.shuffle seems to only support a single object/slice. Shuffling each slice individually would only shuffle between each slice, rather than all the slices.