views:

1661

answers:

3

The first examples that I googled didn't work. This should be trivial, right?

+6  A: 
import random
random.choice([1, 2, 3])
kotlinski
+15  A: 
import random
random.choice (mylist)
eduffy
+4  A: 

Here's the documentation link: http://docs.python.org/library/random.html#random.choice

Khandelwal