runnig

random.choice

Mar 24th, 2015
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. >>> import random
  2. >>> random.choice([1,2,3])
  3. 0: 3
  4. >>> random.choice([1,2,3,5,6,7,8])
  5. 1: 1
  6. >>> random.choice([1,2,3,5,6,7,8])
  7. 2: 6
Advertisement
Add Comment
Please, Sign In to add comment