557. Reverse Words in a String III
https://leetcode.com/problems/reverse-words-in-a-string-iii/
Python
class Solution:
def reverseWords(self, s: str) -> str:
words = s.split(' ')
for i in range(len(words)):
words[i] = words[i][::-1]
return ' '.join(words)