You can download this code by clicking the button below.
This code is now available for download.
This function takes a list of items as an argument and returns a new list with the items shuffled randomly.
Technology Stack : random
Code Type : Function
Code Difficulty : Beginner
import random
def shuffle_list(items):
"""
Randomly shuffle a list of items.
"""
return random.sample(items, len(items))