Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from string import ascii_lowercase
- import itertools
- def iter_all_strings():
- for size in itertools.count(1):
- for s in itertools.product(ascii_lowercase, repeat=size):
- yield "".join(s)
- for s in iter_all_strings():
- print(s)
- if s == 'bb':
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement