Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import itertools
- letters = ['a', 'b', 'c']
- combs = list(itertools.product(letters, repeat=4))
- with open("text.txt", "w") as f:
- for comb in combs:
- f.write(''.join(comb) + 'bac')
- f.write('\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement