You can download this code by clicking the button below.
This code is now available for download.
This function takes a list as input and returns a shuffled copy of it.
Technology Stack : random.sample
Code Type : Function
Code Difficulty : Intermediate
import random
def shuffle_list(input_list):
"""
This function takes a list as an input and returns a shuffled version of it.
"""
return random.sample(input_list, len(input_list))
# JSON Explanation