Ritam_C

Uri 1024

Dec 27th, 2020
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. t = int(input())
  2.  
  3. while t > 0:
  4.     s = list(input())
  5.    
  6.     for i in range(len(s)):
  7.         if s[i].isalpha():
  8.             s[i] = chr(ord(s[i])+3)
  9.    
  10.     s.reverse()
  11.     for i in range(len(s)//2, len(s)):
  12.         s[i] = chr(ord(s[i])-1)
  13.    
  14.     print(''.join(s))
  15.     t -= 1
Advertisement
Add Comment
Please, Sign In to add comment