Given a sentence, return a new string with the order of words reversed, preserving single spaces between words.
Constraints
Example
>>> reverse_words("hello world")
"world hello"
>>> reverse_words("Python is fun")
"fun is Python"
>>> reverse_words("single")
"single"
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints