Sichanov

triples_of_latin_letters

Sep 24th, 2021
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. from itertools import product
  2. from string import ascii_lowercase
  3.  
  4. number = int(input())
  5.  
  6. first_chars = ascii_lowercase[:number]
  7.  
  8. for word in product(first_chars, repeat=number):
  9.     print(''.join(word))
Advertisement
Add Comment
Please, Sign In to add comment