mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
Initial
This commit is contained in:
parent
e51406583c
commit
4e3ff7c8e2
13
other/password_generator.py
Normal file
13
other/password_generator.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import string
|
||||||
|
from random import *
|
||||||
|
|
||||||
|
letters = string.ascii_letters
|
||||||
|
digits = string.digits
|
||||||
|
symbols = string.punctuation
|
||||||
|
chars = letters + digits + symbols
|
||||||
|
|
||||||
|
min_length = 8
|
||||||
|
max_length = 16
|
||||||
|
password = ''.join(choice(chars) for x in range(randint(min_length, max_length)))
|
||||||
|
print('Password: %s' % password)
|
||||||
|
print('[ If you are thinking of using this passsword, You better save it. ]')
|
Loading…
Reference in New Issue
Block a user