Skip to content

Instantly share code, notes, and snippets.

@chetmancini
Created December 20, 2013 14:55
Show Gist options
  • Save chetmancini/8055836 to your computer and use it in GitHub Desktop.
Save chetmancini/8055836 to your computer and use it in GitHub Desktop.
Get a random list of 5 words. Imagine the possibilities.
#!/usr/bin/python
from random import shuffle
with open("/usr/share/dict/words") as f:
content = f.readlines()
shuffle(content)
for word in content[:5]:
print word
@jcartledge
Copy link

shuf /usr/share/dict/words -n 5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment