题解 | 单词倒排
单词倒排
https://www.nowcoder.com/practice/81544a4989df4109b33c2d65037c5836
s=input().strip()
str1=""
for i in s:
if i.isalpha():
str1 = str1 + i
elif not i.isalpha():
str1 = str1 + " "
str2 = str1.split(" ")
str2.reverse()
print(" ".join(str2))#注意这步
