Skip to content

Instantly share code, notes, and snippets.

@csm
Created August 10, 2011 22:57
Show Gist options
  • Save csm/1138506 to your computer and use it in GitHub Desktop.
Save csm/1138506 to your computer and use it in GitHub Desktop.
Random passphrase generator.
# RE: http://xkcd.com/936/
import random
n = 4
f = open('/usr/share/dict/words', 'r')
w = f.readlines()
print " ".join(map(lambda x : x.strip(), random.sample(w, n)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment