字符串反码 A
时间:2021-09-16 00:31:19
收藏:0
阅读:54
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=‘‘)
原文:https://www.cnblogs.com/shizihao/p/15267454.html
评论(0)