Last active
March 16, 2016 13:37
-
-
Save wang-zhijun/7868919 to your computer and use it in GitHub Desktop.
Pythonでランダムに8桁のパスワードを生成
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
#!/usr/bin/env python | |
from random import choice | |
import string | |
def GetPasswd(length=8, chars = string.letters+string.digits): | |
return ''.join([choice(chars) for i in range(length) ]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
8桁のランダムのパスワードを生成する