Luk4545

Reverse words

Nov 1st, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.12 KB | None | 0 0
  1. text = "Hello World"
  2. data = text.split()
  3. t = ''
  4.  
  5. for temp in data:
  6.     t += temp[::-1] + " "
  7.  
  8. t = t.strip()
  9. print t
Advertisement
Add Comment
Please, Sign In to add comment