#import the random module import random my_list = ['apple', 'banana', 'orange', 'strawberry', 'mango'] #pick a random item from the list print(random.choice(my_list))import random #1.A single element random.choice(list) #2.Multiple elements with replacement random.choices(list, k = 4) #3.Multiple elements without replacement random.sample(list, 4)import random sequence = [i for i in range(20)] subset = random.sample(sequence, 5) #5 is the lenth of the sample print(subset) # prints 5 random numbers from sequence (without replacement)import random my_list = [1, 2, 3, 4, 5] random_element = random.choice(my_list) print(random_element)random.choice(name of list)import random choose = ["Egg","Rat","Rabbit","Frog","Human"] Choosen = random.choice(choose) print(Choosen)import random # with replacement = same item CAN be chosen more than once. # without replacement = same item CANNOT be chosen more then once. # Randomly select 2 elements from list without replacement and return a list random.sample(list_name, 2) # Randomly select 3 elements from list with replacement and return a list random.choices(set_name, k=3) # Returns 1 random element from list random.choice(list_name)import random nums = ['a', 'b', 'c', 'd', 'e'] print(random.choice(nums)) import random # there are 2 ways for this listofnum = [1, 2, 3, 4, 5] # 1 print(random.choice(listofnum)) # 2 random.shuffle(listofnum) print(listofnum)import random numberList = [1,2,3,4,5] print(random.choice(numberList)) # Prints a random number from the listimport random my_list = [1, 2, 3, 4, 5] random_element = random.choice(my_list) print(random_element)