Advertisement
BbJLeB

02. Letters Combinations

Jun 6th, 2019
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. # 02. Letters Combinations
  2.  
  3. start_symbol = ord(input())
  4. end_symbol = ord(input())
  5. skip_symbol = ord(input())
  6.  
  7. total_combinations = 0
  8.  
  9. for x1 in range(start_symbol, end_symbol + 1):
  10.     for x2 in range(start_symbol, end_symbol + 1):
  11.         for x3 in range(start_symbol, end_symbol + 1):
  12.             if x1 != skip_symbol and x2 != skip_symbol and x3 != skip_symbol:
  13.                 total_combinations += 1
  14.                 print(f"{chr(x1)}{chr(x2)}{chr(x3)}", end=" ")
  15. print(total_combinations)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement