Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # b_strong_password_generator.py
- import random
- import string
- words = string.ascii_uppercase
- words2 = string.ascii_lowercase
- numbers = string.digits
- spec_char = '!@#$%'
- password = []
- for i in range(2):
- password += [random.choice(words)]
- for i in range(2):
- password += [random.choice(words2)]
- for i in range(2):
- password += [random.choice(numbers)]
- for i in range(2):
- password += [random.choice(spec_char)]
- for i in range(8):
- password += [random.choice(words+words2+numbers+spec_char)]
- random.shuffle(password)
- password = ''.join(password)
- print(password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement