import itertools as its #itertools is an iterator that can generate passwords through loops
word='1234567890abcdefghijklmnopqrstuvwxyz' #Possible items for entering a password
r=its.product(word,repeat=8) #Start to generate, the number of digits is 8 digits
dict=open("D://python码本.txt","a") #Open the created txt file
for i in r:
#Circular write data dict.write("".join(i))
dict. write("".join("\n")) #Pay attention to line breaks
dict.close() #Close the file