题解 | #单词倒排#
单词倒排
http://www.nowcoder.com/practice/81544a4989df4109b33c2d65037c5836
while True: try: s = input() for i in s: if not i.isdigit() and not i.isalpha(): #把其它字符替换为空格 s = s.replace(i,' ') s = s.split()[::-1] print(' '.join(s)) except: break