Answers for "how to reverse word of a strings in python"

1

reverse each word in a string python

def reverse_word_sentence (sentence): 
  return ' '.join(word[::-1] for word in sentence.split(" ")) 

# Input: "Split Reverse Join"
# Output: "tilpS esreveR nioJ"
Posted by: Guest on March-08-2021

Code answers related to "how to reverse word of a strings in python"

Python Answers by Framework

Browse Popular Code Answers by Language