Sichanov

letter

Oct 26th, 2021
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. start_letter = input()
  2. end_letter = input()
  3. skip_letter = input()
  4.  
  5. start_num = ord(start_letter)
  6. end_num = ord(end_letter)
  7. skip_num = ord(skip_letter)
  8.  
  9. counter = 0
  10.  
  11. for first in range(start_num, end_num + 1):
  12.     for second in range(start_num, end_num + 1):
  13.         for third in range(start_num, end_num + 1):
  14.             if first == skip_num or second == skip_num or third == skip_num:
  15.                 continue
  16.             else:
  17.                 counter += 1
  18.                 print(f"{chr(first)}{chr(second)}{chr(third)}", end=" ")
  19.  
  20. print(counter)
Advertisement
Add Comment
Please, Sign In to add comment