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 it after shuffling it randomly.
Technology Stack : random, list
Code Type : List scrambled
Code Difficulty : Intermediate
import random
import json
def shuffle_list(input_list):
if not input_list:
return []
random.shuffle(input_list)
return input_list