python get random item from array code example
Example 1: how to print a random part of a list in python
import random
foo = ['a', 'b', 'c', 'd', 'e']
print(random.choice(foo))
Example 2: pick a random number from a list in python
import random
numberList = [1,2,3,4,5]
print(random.choice(numberList)) # Prints a random number from the list