1import random
2names=['Mark', 'Sam', 'Henry']
3
4#Set any array
5random_array_item=random.choice(names)
6
7#Declare a variable as a random choice
8print(random_array_item)
9
10#Print the random choice
11#Or, if you want to arrange them in any order:
12for j in range(names):
13 print(random.choice(names))
1import random
2
3rand_index = random.randrange(len(list))
4random_num = list[rand_index]
5
6random_num = random.choice(list)