xxxxxxxxxx
import random #imports random module which is built-in
random_fruits = ['apple', 'mango', 'banana'] #make a list of fruits and store it in the variable
print(random.choice(random_fruits)) #print fruits randomly
xxxxxxxxxx
import random
print(random.randint(3, 7)) #Prints a random number between 3 and 7
array = [cars, bananas, jet]
print(random.choice(array)) #Prints one of the values in the array at random
xxxxxxxxxx
# To import the random module in python, do the following
import random # This will import
# testing
print(random.randint(0, 3)) # This will print a random number from 0 to 3
# Hope this helps!!
# By Codexel
xxxxxxxxxx
import random
my_list = [func_test_1, func_test_2, func_test_3]
random.choice(my_list)()
xxxxxxxxxx
import random
my_list = [1, 'a', 32, 'c', 'd', 31]
print(random.choice(my_list))