from string import ascii_letters, digits
from random import choice
length = int(input("length: "))
pass_amount = int(input("pass_amount: "))
list1 = ascii_letters + digits
password = str()
counter = 0
with open("C:/py/pass.txt", "w") as f:
while counter != pass_amount:
for i in choice(list1):
password += i
if len(password) == length:
password += "\n"
f.write(password)
print(password)
counter += 1
password = str()
ZnJvbSBzdHJpbmcgaW1wb3J0IGFzY2lpX2xldHRlcnMsIGRpZ2l0cwpmcm9tIHJhbmRvbSBpbXBvcnQgY2hvaWNlCgpsZW5ndGggPSBpbnQoaW5wdXQoImxlbmd0aDogIikpCnBhc3NfYW1vdW50ID0gaW50KGlucHV0KCJwYXNzX2Ftb3VudDogIikpCgpsaXN0MSA9IGFzY2lpX2xldHRlcnMgKyBkaWdpdHMKcGFzc3dvcmQgPSBzdHIoKQpjb3VudGVyID0gMAoKd2l0aCBvcGVuKCJDOi9weS9wYXNzLnR4dCIsICJ3IikgYXMgZjoKCXdoaWxlIGNvdW50ZXIgIT0gcGFzc19hbW91bnQ6CgkJZm9yIGkgaW4gY2hvaWNlKGxpc3QxKToKCQkJcGFzc3dvcmQgKz0gaQoJCQlpZiBsZW4ocGFzc3dvcmQpID09IGxlbmd0aDoKCQkJCQoJCQkJcGFzc3dvcmQgKz0gIlxuIgoJCQkJZi53cml0ZShwYXNzd29yZCkKCQkJCXByaW50KHBhc3N3b3JkKQoJCQkJY291bnRlciArPSAxCgkJCQlwYXNzd29yZCA9IHN0cigpCg==