demo_ref_random_choice.py:
import random mylist = ["apple", "banana", "cherry"] print(random.choice(mylist))
➜ begtut>python demo_random_choice.py