SyntaxFix
Write A Post
Hire A Developer
Questions
If you also need the index, use random.randrange
random.randrange
from random import randrange random_index = randrange(len(foo)) print(foo[random_index])