Skip to content

Instantly share code, notes, and snippets.

@garrettreid
Created June 16, 2018 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garrettreid/d5f595b6fd73d8772b91ba2ac9e7be16 to your computer and use it in GitHub Desktop.
Save garrettreid/d5f595b6fd73d8772b91ba2ac9e7be16 to your computer and use it in GitHub Desktop.
Select random words from the dictionary
#!/usr/bin/env python2
from random import choice
with open("/usr/share/dict/words", "r") as wordlist:
words = wordlist.read().splitlines()
print "Hit enter for each random word",
while True:
raw_input()
print choice(words),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment