字符串反码

str1=input()
for i in str1:
if 'a'<=i<='z':
print(chr(ord('z')-(ord(i)-ord('a'))),end='')
elif 'A'<=i<='Z':
print(chr(ord('Z')-(ord(i)-ord('A'))),end='')
else:
print(i,end='')

原文地址:https://www.cnblogs.com/2640335699qqcom/p/12561379.html