Advertisement
elena1234

How to work with char ( Python )

Feb 1st, 2022
1,362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. symbol1 = input()
  2. symbol2 = input()
  3.  
  4. def return_characters(symbol1, symbol2):
  5.     symbol1 = ord(symbol1)
  6.     symbol2 = ord(symbol2)
  7.     result = []
  8.     for i in range(symbol1 + 1, symbol2):
  9.         char = chr(i)
  10.         result.append(char)
  11.     result = " ".join(result)
  12.    
  13.     return result
  14.  
  15. print(return_characters(symbol1, symbol2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement