我正在尝试制作一个产品,它有2个列表,每个列表有3个变量,每个变量组合成1个列表/产品
我尝试合并3个字母和3个数字,所以我用字符串来表示,这是伪代码。
product(string.ascii_lowercase, repeat=int(3)) + product(string.digits, repeat=int(3))
i have gotten thi working but this goes through all letters before combining with numbers so its rather slow
product(string.ascii_lowercase+ string.digits, repeat=int(6))
`
1条答案
按热度按时间gijlo24d1#
basically create two iterators like you are
turn it into lists instead of iterators
then just get the product of those two
and you should get something that looks like your passwords .... its still alot of combinations ... but its pretty fast