/
Allexandr
/
Test_1
Обзор
Документация
Войти
/
Allexandr
/
Test_1
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
new.py
33 строки
917 B
Alexandr
create: new.py
04 июн 2026, 19:41
Верифицирован
04 июн 2026, 19:41
e7fdec3
Код
Авторство
О чём код?
import random digits = '0123456789' lowercase_letters = 'abcdefghijklmnopqrstuvwxyz' uppercase_letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' punctuation = '!#$%&*+-=?@^_' chars = '' q = int(input('quantity password? ')) l = int(input('length')) a = input('numbers? ') if a == 'yes': chars += digits b = input('Включать ли прописные буквы? ') if b == 'yes': chars += lowercase_letters c = input('lowercase_letters') if c == 'yes': chars += uppercase_letters d = input('Включать ли символы') if d == 'yes': chars += punctuation e = input('Исключать ли неоднозначные символы il1Lo0O? ') z = 'il1Lo0O' if e == 'yes': for i in z: chars = chars.replace(i,'') def generate_password(chars, l): password = random.choice(chars, l) return password f = generate_password(chars, l) print(f)