Vatsal
Jan 18, 2021

--

question 6 solution with list comprehension :

def reverseWords(self, s: str) -> str:

return ' '.join([x[::-1] for x in s.split()])

--

--

Responses (1)