s=”我爱 13aPP14LE!”
ans=res=""
for x in s:
if "a"<=x<="z":
ans=ans+chr(ord(x)-32)
if "A"<=x<="Z":
ans=ans+chr(ord(x)+32)
if "0"<=x<="9":
res=res+x t=ans+res
print(t)
微信扫码预览、分享更方便