-
Python13 期字符串大考核!!!
2020-07-24 10:55s="sdSdsfdAdsdsdfsfdsdASDSDFDSFa"
s1=s.swapcase()
print("调整之后的字符串为",s1)
new_s=''
for i in s1:
if i.islower():
i = chr(219-ord(i))
new_s +=i
elif i.isupper():
i=chr(155-ord(i))
new_s += i
print("镜像之后的值:", new_s)