Easy Python Practice Question 3 - Reversing Letters Of Words In A Sentence

Опубликовано: 19 Октябрь 2024
на канале: Python With Liu
669
10

Write a function that takes in a sentence, and reverses the letters of the words inside the sentence. The order of the words in the sentence should remain the same.

Assume words in a sentence are separated by spaces, and that sentences don't contain punctuation.

"apple orange pear" becomes "elppa egnaro raep"
"i am happy" becomes "i ma yppah"

My Medium page - I write articles on Python coding that would have probably benefited the past me
  / zl-liu