Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- password_strenghh =int(input("enter the defficulty from 1 to 10 : "))
- letter_lower = "abcdefghijklmnopqrstwxyz"
- letter_upper = letter_lower.upper()
- numbers = "1234567890"
- special="!@#$%^&*()_+{}"
- password=[]
- def randomchoice(x) :
- return random.choice(x)
- difficulty=password_strenghh*2
- for i in range(difficulty):
- password.append(randomchoice(letter_lower))
- password.append(randomchoice(letter_upper))
- password.append(randomchoice(numbers))
- password.append(randomchoice(special))
- password2=''.join(password)
- print(password2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement