Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import*
- from termcolor import colored
- a = int(input("Введите количество знаков в пароле (от 8 до 16 знаков): "))
- number = "0123456789"
- new_string = "qwertyuiopasdfghjklzxcvbnm"
- up_string = new_string.upper()
- password = number + new_string + up_string
- List = list(password)
- shuffle(List)
- user_password = ''.join([choice(List) for x in range(a)])
- if (a<8)or(a>16):
- print(colored("Error", 'red'))
- else:
- print(user_password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement