DiYane

Triples of Latin Letters

Jul 28th, 2023 (edited)
771
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. def print_all_letter_combinations(N):
  2.     letters = "abcdefghijklmnopqrstuvwxyz"
  3.  
  4.     for i in range(N):
  5.         for j in range(N):
  6.             for k in range(N):
  7.                 print(letters[i] + letters[j] + letters[k])
  8.  
  9. N = int(input())
  10.  
  11. print_all_letter_combinations(N)
  12.  
Tags: python
Advertisement
Add Comment
Please, Sign In to add comment