You can download this code by clicking the button below.
This code is now available for download.
Randomly shuffles the elements of a list and returns a new list with the same elements in a different order.
Technology Stack : random.sample
Code Type : List scrambled
Code Difficulty : Intermediate
import random
import json
def shuffle_list(input_list):
return random.sample(input_list, k=len(input_list))