题解 | #字符串排序#
单词倒排
http://www.nowcoder.com/practice/81544a4989df4109b33c2d65037c5836
s = input()
temp = ""
for i in s:
d = ord(i)
if (d >= 65 and d<=90) or (d >= 97 and d <= 122):
temp = temp + i
else:
if temp != "": # 防止第一个就是非字母而出现空格
temp = temp + " "
temp_list = temp.split(" ")
for i in temp_list[::-1]:
print(i, end=" ")