How do I select a random element from an array in Python? [duplicate]
The first examples that I googled didn't work. This should be trivial, right?
import random
random.choice (mylist)
import random
random.choice([1, 2, 3])
The first examples that I googled didn't work. This should be trivial, right?
import random
random.choice (mylist)
import random
random.choice([1, 2, 3])