fork download
  1. start, end = 97, 122 # a: 94, z: 122
  2.  
  3. def correspondent_char(character):
  4. char_int = ord(character)
  5.  
  6. if (char_int >= start and char_int <= end):
  7. char_int += (end - char_int) + (start - char_int)
  8.  
  9. else:
  10. return character
  11.  
  12. return chr(char_int)
  13.  
  14. def solution(x):
  15. descripted_string = ""
  16.  
  17. for character in x:
  18. descripted_string += correspondent_char(character)
  19.  
  20. return descripted_string
  21.  
Success #stdin #stdout 0.02s 7168KB
stdin
Standard input is empty
stdout
Standard output is empty