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()
