Let\'s say I have to variables, dog and cat. Dog = 5, and cat = 3. How would I tell Python to pick one of these variables by random and print it to the screen?
import random print random.choice([dog, cat])
It's that simple. choice() takes a sequence and returns a random selection from it.
choice()