Advertisement
Konark

Untitled

Mar 4th, 2024
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. text = "The quick brown fox jumps over the lazy dog."
  2.  
  3. def reverse_words(text):
  4. words_list = text.split(" ")
  5. reversed_words_list = []
  6.  
  7. for word in words_list:
  8. reversed_words_list.append(word[::-1])
  9.  
  10. return " ".join(reversed_words_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement