You can download this code by clicking the button below.
This code is now available for download.
Define a function to shuffle the order of the input list.
Technology Stack : random
Code Type : Function
Code Difficulty : Intermediate
import random
def shuffle_list(input_list):
if not input_list:
return []
random.shuffle(input_list)
return input_list