I would like to randomly shuffle the list so that each variable in the list falls into a new place in the list when shuffling.
What am I doing now:
list = ['a', 'b','c', 'd']; random.shuffle(list) list ['c','b','d','a']
With this method, I shuffle the list, but in this case it is still possible for the variable to be in the same place in this case.
My desired result
fully shuffled list
['c','a','d','b']
I appreciate any help. I am new to python, but please let me know if any further information is needed.
source share