The first examples that I googled didn't work. This should be trivial, right?
Asked
Active
Viewed 1.4e+01k times
119
-
5This was in my first hit: http://docs.python.org/library/random.html#module-random -- random.choice(seq)¶ Return a random element from the non-empty sequence seq. – Daniel Sloof Jun 29 '09 at 14:52
-
1Many times looking in the library can be more helpful. Getting the documentation for the random module would have worked. It does take some time to know where to look, but for anything involving "random" check the random module first. – Kathy Van Stone Jun 29 '09 at 15:18