Created
June 16, 2018 19:23
-
-
Save garrettreid/d5f595b6fd73d8772b91ba2ac9e7be16 to your computer and use it in GitHub Desktop.
Select random words from the dictionary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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