Code golf challenge: XKCD 936 passwords

Chris Angelico rosuav at gmail.com
Tue Oct 8 02:17:21 EDT 2013


Who's up for some fun? Implement an XKCD-936-compliant password
generator in Python 3, in less code than this:

print(*__import__("random").sample(open("/usr/share/dict/words").read().split("\n"),4))

Second challenge: Use it for generating all your passwords :)

[1] https://en.wikipedia.org/wiki/Code_golf
[2] http://xkcd.com/936/

ChrisA



More information about the Python-list mailing list