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 version of the list. It uses the sample function from the random module.
Technology Stack : random
Code Type : List scrambled
Code Difficulty : Intermediate
import random
def shuffle_list(input_list):
return random.sample(input_list, len(input_list))