Skip to main content
 首页 » 编程设计

python之继续在 python 中创建可能的字符串列表

2025年05月04日22mq0036

<分区>

Possible Duplicate:
Using itertools.product and want to seed a value

我有这段代码,它生成一个一致的字符串列表。

import itertools 
choices = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789" 
for length in range(0,20): 
    for entry in itertools.product(choices, repeat = length): 
        string = ''.join(entry) 
        print string 

我希望能够从最后一个已知字符串继续运行此脚本。这怎么可能?