Advertisement
simeonshopov

Characters in range

Dec 10th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. chr_1 = input()
  2. chr_2 = input()
  3.  
  4. def in_between(a, b):
  5.     result = ''
  6.     for i in range(ord(a) + 1, ord(b)):
  7.         result += f'{chr(i)} '
  8.     return result
  9.  
  10. print(in_between(chr_1, chr_2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement