句子逆序list.reverse() .join()/for
句子逆序
https://www.nowcoder.com/practice/48b3cb4e3c694d9da5526e6255bb73c3
while True:
try:
words=list((input().split(' ')))
#print(type(words),words)
words.reverse()
#print(words)
for word in words:
print(word,end=' ')
print()
#print(' '.join(words)) 直接用join()更简洁
except:
break