You can download this code by clicking the button below.
This code is now available for download.
This function takes a list of items and randomly shuffles its order, returning a new list with the shuffled items.
Technology Stack : random
Code Type : Function
Code Difficulty : Intermediate
import random
def shuffle_list(items):
"""
Randomly shuffle a list of items.
"""
random.shuffle(items)
return items