s="HangZhou-0571"
y=""
for i in range(len(s)):
c=s[i]
if c>="A" and c<="Z":
c=chr(ord(c)-1)
elif c>="0" and c<="9":
c=chr(ord(c)+1)
y=c+y
print(y)
程序运行后,输出的结果是( )
微信扫码预览、分享更方便