You can download this code by clicking the button below.
This code is now available for download.
Defined a function that takes a list as an argument and shuffles its elements in place.
Technology Stack : Random
Code Type : Function
Code Difficulty : Intermediate
import random
def shuffle_list(items):
"""
Shuffle the elements of the list in-place.
"""
random.shuffle(items)
return items