Stonex Group displays short text labels whose words occasionally need character-level reversal for a formatting operation. Given a string, reverse the characters in every word while preserving the original word order and the single spaces between words.
Implement reverse_words(text).
text, a non-empty string containing one or more words separated by exactly one space.def reverse_words(text):