Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from itertools import product
- from string import ascii_lowercase
- number = int(input())
- first_chars = ascii_lowercase[:number]
- for word in product(first_chars, repeat=number):
- print(''.join(word))
Advertisement
Add Comment
Please, Sign In to add comment