In [1]:
import random

In [2]:
l = [0, 1, 2, 3, 4]

In [3]:
print(random.choice(l))


0

In [4]:
print(random.choice(('xxx', 'yyy', 'zzz')))


yyy

In [5]:
print(random.choice('abcde'))


b

In [6]:
# print(random.choice([]))
# IndexError: Cannot choose from an empty sequence

In [7]:
random.seed(0)
print(random.choice(l))


3