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
while counter != pass_amount:
for i in choice(list1):
password += i
if len(password) == length:
f = open("C:/py/pass.txt", "w")
password += "\n"
f.write(password)
f.close()
print(password)
counter += 1
password = str()
ZnJvbSBzdHJpbmcgaW1wb3J0IGFzY2lpX2xldHRlcnMsIGRpZ2l0cwpmcm9tIHJhbmRvbSBpbXBvcnQgY2hvaWNlCgpsZW5ndGggPSBpbnQoaW5wdXQoImxlbmd0aDogIikpCnBhc3NfYW1vdW50ID0gaW50KGlucHV0KCJwYXNzX2Ftb3VudDogIikpCgpsaXN0MSA9IGFzY2lpX2xldHRlcnMgKyBkaWdpdHMKcGFzc3dvcmQgPSBzdHIoKQpjb3VudGVyID0gMAoKd2hpbGUgY291bnRlciAhPSBwYXNzX2Ftb3VudDoKCWZvciBpIGluIGNob2ljZShsaXN0MSk6CgkJcGFzc3dvcmQgKz0gaQoJCWlmIGxlbihwYXNzd29yZCkgPT0gbGVuZ3RoOgoJCQlmID0gb3BlbigiQzovcHkvcGFzcy50eHQiLCAidyIpCgkJCXBhc3N3b3JkICs9ICJcbiIKCQkJZi53cml0ZShwYXNzd29yZCkKCQkJZi5jbG9zZSgpCgkJCXByaW50KHBhc3N3b3JkKQoJCQljb3VudGVyICs9IDEKCQkJcGFzc3dvcmQgPSBzdHIoKQo=