字符串反码

str1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxzy"
str2="YZXWVUTSRQPONMLKJIHGFEDCBAzyxwvutsrqponmlkjihgfedcba"
str=str(input(""))
for i in range(len(str)):
if str[i]==" ":
print(" ",end="")
else:
n=0 #特殊字符判断
j=0
for j in range(0,52):
if str[i]==str1[j]:
print(str2[j],end="")
n=1
if n==0:
print(str[i],end="")



字符串反码

上一篇:iview报错[Vue warn]: Error in render: "TypeError: ctx.injections.tableRoot.$scopedSlots[ctx.props.column.slot] is not a function"


下一篇:[LeetCode] 447. Number of Boomerangs