2.3 字符串逆序输出

用户输入一个字符串,倒序输出。

cipher = input()
lenght =len(cipher)
j =-1
for i in range(0,lenght):
    print(cipher[j],end="")
    j =j-1

结果为:

猜你喜欢

转载自blog.csdn.net/m0_61463713/article/details/120286220
2.3