题解 | #字符逆序#
字符逆序
https://www.nowcoder.com/practice/cc57022cb4194697ac30bcb566aeb47b
while True: try: a = str(input()) result = a[::-1] for i in result: print(i, end='') except: break
利用[::-1]进行反向排序,然后逐个元素输出即可
字符逆序
https://www.nowcoder.com/practice/cc57022cb4194697ac30bcb566aeb47b
while True: try: a = str(input()) result = a[::-1] for i in result: print(i, end='') except: break
利用[::-1]进行反向排序,然后逐个元素输出即可
相关推荐