字符串反码 A

"""字符串反码"""

s = input()

for c in s:

        if 'a' <= c <= 'z':

            print(chr(ord('z')-(ord(c)-ord('a'))),end='')

        elif 'A' <= c <= 'Z':

            print(chr(ord('Z')-(ord(c)-ord('A'))),end='')

        else:

            print(c,end='')

 

 

 

 

 学号:2020310143012

昵称:苒若

posted @ 2021-09-13 22:45  苒若  阅读(67)  评论(0)    收藏  举报