1import random
2number_list = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70]
3print ("Original list : ", number_list)
4
5random.shuffle(number_list) #shuffle method
6print ("List after shuffle : ", number_list)
1from random import randint
2
3print(randint(1,3))
4
5#Possible Outputs#
6#1
7#2
8#3
1import random
2
3number_list = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70]
4print("Original list:", number_list)
5
6random.shuffle(number_list)
7print("List after first shuffle:", number_list)
8
9random.shuffle(number_list)
10print("List after second shuffle:", number_list)
1
2import random
3
4list = [20, 16, 10, 5]
5random.shuffle(list)
6print("Reshuffled list : ",list)
7
8OUTPUT:
9Reshuffled list : [16, 5, 10, 20]