Created
December 5, 2011 12:10
-
-
Save flashingpumpkin/1433394 to your computer and use it in GitHub Desktop.
randompw.py
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 python | |
| import random | |
| import string | |
| def random_pw(): | |
| char_set = list(string.letters + string.letters.upper() + string.digits + string.punctuation) | |
| return ''.join(random.sample(char_set, 20)) | |
| if __name__ == "__main__": | |
| print random_pw() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment