Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import itertools
- import string
- from time import sleep
- def combinations():
- for i in range(1, 4):
- yield from itertools.product(string.ascii_lowercase, repeat=i)
- def step(g):
- tasks_list = []
- for i in range(1000):
- try:
- query = ''.join(next(g))
- tasks_list.append(query)
- except StopIteration:
- return None, None
- return check, tasks_list
- g = combinations()
- check = True
- while check:
- check, list_tasks = step(g)
- print(list_tasks)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement