Advertisement
Spocoman

02. Letters Combinations

Jan 1st, 2022 (edited)
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. x = ord(input())
  2. y = ord(input())
  3. z = ord(input())
  4. counter = 0
  5.  
  6. for i in range(x, y + 1):
  7.     for k in range(x, y + 1):
  8.         for j in range(x, y + 1):
  9.             if i != z and k != z and j != z:
  10.                 print(f'{chr(i)}{chr(k)}{chr(j)}', end=' ')
  11.                 counter += 1
  12.  
  13. print(counter)
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement