how to randomly choose a string from a list in python code example
Example 1: print random string from list python
import random
list = ["Item 1", "Item 2", "Item 3"] # List
item = random.choice(list) # Chooses from list
print(item) # Prints choice
# From stackoverflow
# Tried and tested method
Example 2: python how to randomly choose an item from a list
import random
nums = ['a', 'b', 'c', 'd', 'e']
print(random.choice(nums))