from random import choice
from string import ascii_letters, digits


error = ('I', 'l', 'o', 'O', '1', '0')


def generate_password(m):
    password = ""
    count = 0
    while count != m:
        flag = choice([True, False])
        if flag:
            symbol = choice(ascii_letters)
        else:
            symbol = choice(digits)
        if symbol not in error and symbol not in password:
            password += symbol
            count += 1
    return password


def main(n, m):  # n - колтчество m - длина
    passwords = []
    for i in range(n):
        passwords.append(generate_password(m))
    return passwords


print('Случайный пароль из 7 символов:', generate_password(7))
print('10 случайных паролей длиной 15 символов:')
print(*main(10, 15), sep='\n')

2690e3ce619abd4ea28870785dfddd5ba651e086
<mask token>


def main(n, m):
    passwords = []
    for i in range(n):
        passwords.append(generate_password(m))
    return passwords


<mask token>

<mask token>


def generate_password(m):
    password = ''
    count = 0
    while count != m:
        flag = choice([True, False])
        if flag:
            symbol = choice(ascii_letters)
        else:
            symbol = choice(digits)
        if symbol not in error and symbol not in password:
            password += symbol
            count += 1
    return password


def main(n, m):
    passwords = []
    for i in range(n):
        passwords.append(generate_password(m))
    return passwords


<mask token>

<mask token>


def generate_password(m):
    password = ''
    count = 0
    while count != m:
        flag = choice([True, False])
        if flag:
            symbol = choice(ascii_letters)
        else:
            symbol = choice(digits)
        if symbol not in error and symbol not in password:
            password += symbol
            count += 1
    return password


def main(n, m):
    passwords = []
    for i in range(n):
        passwords.append(generate_password(m))
    return passwords


print('Случайный\xa0пароль\xa0из\xa07\xa0символов:', generate_password(7))
print('10\xa0случайных\xa0паролей\xa0длиной\xa015\xa0символов:')
print(*main(10, 15), sep='\n')

<mask token>
error = 'I', 'l', 'o', 'O', '1', '0'


def generate_password(m):
    password = ''
    count = 0
    while count != m:
        flag = choice([True, False])
        if flag:
            symbol = choice(ascii_letters)
        else:
            symbol = choice(digits)
        if symbol not in error and symbol not in password:
            password += symbol
            count += 1
    return password


def main(n, m):
    passwords = []
    for i in range(n):
        passwords.append(generate_password(m))
    return passwords


print('Случайный\xa0пароль\xa0из\xa07\xa0символов:', generate_password(7))
print('10\xa0случайных\xa0паролей\xa0длиной\xa015\xa0символов:')
print(*main(10, 15), sep='\n')

from random import choice
from string import ascii_letters, digits


error = ('I', 'l', 'o', 'O', '1', '0')


def generate_password(m):
    password = ""
    count = 0
    while count != m:
        flag = choice([True, False])
        if flag:
            symbol = choice(ascii_letters)
        else:
            symbol = choice(digits)
        if symbol not in error and symbol not in password:
            password += symbol
            count += 1
    return password


def main(n, m):  # n - колтчество m - длина
    passwords = []
    for i in range(n):
        passwords.append(generate_password(m))
    return passwords


print('Случайный пароль из 7 символов:', generate_password(7))
print('10 случайных паролей длиной 15 символов:')
print(*main(10, 15), sep='\n')
