Clear Python Solution


  • 0
    class Solution(object):
        def reverseWords(self, s):
            """
            :type s: str
            :rtype: str
            """
            words = s.split(' ')
            words = map(lambda x: x[::-1], words)
            res = ' '.join(words)
            return res
    

  • 0
    L
    This post is deleted!

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.