题解 | #数字颠倒#
数字颠倒
https://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
有个疑问:为什么在第四行加上reverse不行,只能用[::-1]
while True:
try:
list1 = list(input()[::-1])
print(''.join(list1))
except:
break
数字颠倒
https://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
有个疑问:为什么在第四行加上reverse不行,只能用[::-1]
while True:
try:
list1 = list(input()[::-1])
print(''.join(list1))
except:
break
相关推荐