mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-20 11:32:07 +08:00
Added Dequeue in Python
This commit is contained in:
14
other/password_generator.py
Normal file
14
other/password_generator.py
Normal file
@ -0,0 +1,14 @@
|
||||
import string
|
||||
import random
|
||||
|
||||
letters = [letter for letter in string.ascii_letters]
|
||||
digits = [digit for digit in string.digits]
|
||||
symbols = [symbol for symbol in string.punctuation]
|
||||
chars = letters + digits + symbols
|
||||
random.shuffle(chars)
|
||||
|
||||
min_length = 8
|
||||
max_length = 16
|
||||
password = ''.join(random.choice(chars) for x in range(random.randint(min_length, max_length)))
|
||||
print('Password: ' + password)
|
||||
print('[ If you are thinking of using this passsword, You better save it. ]')
|
Reference in New Issue
Block a user