#import the random module import random #The list to shuffle my_list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #shuffle the list in-place random.shuffle(my_list) print(my_list)import random random.shuffle(array) import random list = [20, 16, 10, 5] random.shuffle(list) print("Reshuffled list : ",list) OUTPUT: Reshuffled list : [16, 5, 10, 20]import random l = list(range(5)) print(l) # [0, 1, 2, 3, 4] lr = random.sample(l, len(l)) print(lr) # [3, 2, 4, 1, 0] print(l) # [0, 1, 2, 3, 4] # import the random module import random # declare a list sample_list = ['A', 'B', 'C', 'D', 'E'] print("Original list : ") print(sample_list) # first shuffle random.shuffle(sample_list) print("\nAfter the first shuffle : ") print(sample_list) # second shuffle random.shuffle(sample_list) print("\nAfter the second shuffle : ") print(sample_list)import random ary = [8, 7, 1, 67, 77, 108, 801, 800, 777, 131, 414] new_array = random.sample(ary, len(ary) ) for items in range(100): print(random.sample(ary, len(new_array)))import random # Example array array = [1, 2, 3, 4, 5] # Shuffle the array in place random.shuffle(array) print(array) # Output: [3, 4, 1, 5, 2]