Created
May 27, 2015 05:49
-
-
Save achiku/06a0d98ff6a03dd2c138 to your computer and use it in GitHub Desktop.
key
This file contains 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
# -*- coding: utf-8 -*- | |
import random | |
if __name__ == '__main__': | |
length = 50 | |
lower = 'abcdefghijklmnopqnstuvwxyz' | |
upper = 'ABCDEFGHIJKLMNOPQNSTUVWXYZ' | |
digit = '0123456789' | |
symbol = '!@#$%^&*_+' | |
source = list(lower + upper + digit + symbol) | |
key = ''.join([source[random.randint(0, len(source)-1)] for _ in xrange(length)]) | |
print key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment