Skip to content

Instantly share code, notes, and snippets.

@lawrencechen0921
Last active August 9, 2019 13:37
Show Gist options
  • Save lawrencechen0921/f4ebe89a80f3b73fd88ae47c9acfb28b to your computer and use it in GitHub Desktop.
Save lawrencechen0921/f4ebe89a80f3b73fd88ae47c9acfb28b to your computer and use it in GitHub Desktop.
密碼隨機產生器- random pwd
import string #匯入模組string
import random #匯入模組random
chs = string.ascii_letters + string.digits #ascill編碼的英文字母大小寫letters 以及 加入ascill數字
pwd=""
for x in range(random.randint(8,12)): #會回傳8-12次的數字
pwd+=random.choice(chs) #隨機選一個
print(pwd) #列印出來
@lawrencechen0921
Copy link
Author

so good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment