题解 | #单词倒排#
单词倒排
https://www.nowcoder.com/practice/81544a4989df4109b33c2d65037c5836
s = input() for i in s: if not i.isalpha(): s = s.replace(i, " ") #print(s) ls = s.split()[::-1] print(" ".join(ls))
单词倒排
https://www.nowcoder.com/practice/81544a4989df4109b33c2d65037c5836
s = input() for i in s: if not i.isalpha(): s = s.replace(i, " ") #print(s) ls = s.split()[::-1] print(" ".join(ls))
相关推荐