题解 | #字符串的反码#用25减去ASCII码就行
字符串的反码
https://www.nowcoder.com/practice/01b7dae14d1b464db5f9259e90d9a35e
s = input() for c in s: if c.isalpha(): if c.isupper(): print(chr(ord("A") + 25 - (ord(c) - ord("A"))), end="") else: print(chr(ord("a") + 25 - (ord(c) - ord("a"))), end="") else: print(c, end="")