import urllib import random
animals = urllib.urlopen('http://davidbau.com/data/animals').read().split() secret = random.choice(animals) print secret