# -*- coding: utf-8 -*-
import itertools as its
import datetime
#记录程序运行时间
start=datetime.datetime.now()
words = '1234567890'
# 生成密码的位数
r = its.product(words,repeat=8)
dic =open(r"C:\Users\Administrator\Desktop\pwdtxt.txt",'a')
for i in r:
dic.write(''.join(i))
dic.write(''.join('\n'))
print(i)
dic.close()
print(r"密码本生成好了")
end=datetime.datetime.now()
print("生成密码本一共用了多长时间:{}".format(end-start))