思路:穷举方法
1 import itertools as its # https://pypi.org/project/more-itertools/ 2 3 w = '123456' 4 c = its.product(w,repeat=4) 5 num = 0 6 for i in c: 7 num += 1 8 print("第%s种密码:%s"%(num,i)) 9 print('密码输入方式一共%s种'%num)
部分截图
2023-01-24 10:32:38
思路:穷举方法
1 import itertools as its # https://pypi.org/project/more-itertools/ 2 3 w = '123456' 4 c = its.product(w,repeat=4) 5 num = 0 6 for i in c: 7 num += 1 8 print("第%s种密码:%s"%(num,i)) 9 print('密码输入方式一共%s种'%num)
部分截图