Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution(object):
- def reverseWords(self, s):
- """
- :type s: str
- :rtype: str
- """
- wordArr = s.split()
- return " ".join(wordArr[::-1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement