You can download this code by clicking the button below.
This code is now available for download.
This function takes a list as an argument, then uses the shuffle method from the random module to randomly sort the elements within the list, and returns the sorted list.
Technology Stack : random, list sorting
Code Type : Function
Code Difficulty : Intermediate
import random
def shuffle_list(items):
random.shuffle(items)
return items