# Monkeys On A Typewriter import random cmd = ['b', 's'][int(random.random() * 2)] num = str(int(random.random() * 1000000)) print("%s%s" % (cmd, num)) It's a bunch of monkeys on typewriters. Randomly sells or buys X stocks, where: `0 <= X <= 1,000,000` Run with python3, but should(?) work with python2 as well