Question 1: Reverse Words in a String III

 




def reverseWords(s: str) -> str:
    words = s.split()
    return ' '.join(word[::-1] for word in words)

Popular Post

MindMaps

Featured post

Question 1: Reverse Words in a String III

  def reverseWords(s: str) -> str: words = s.split() return ' '.join(word[::-1] for word in words)