Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #~ s = input().split()
- #~ s.reverse()
- #~ print(' '.join(s))
- s = input()
- s += ' '
- s2 = ''
- w = ''
- for x in s:
- if x != ' ':
- w += x
- else:
- if w:
- s2 = ' ' + w + s2
- w = ''
- print(s2[1:])
Advertisement
Add Comment
Please, Sign In to add comment