题解 | #倒置字符串#
倒置字符串
http://www.nowcoder.com/practice/ee5de2e7c45a46a090c1ced2fdc62355
s = input()
sum = len(s)
r = ""
j = sum
for i in range(0,sum):
if s[sum - i - 1] == " ":
r = r + " " + s[sum - i: j]
j = sum - i - 1
r = r + " " + s[0:j]
print(r[1:len(r)])