mirror of
https://github.com/devenperez/leetcode.git
synced 2026-06-13 23:07:08 +00:00
5 lines
139 B
Python
5 lines
139 B
Python
class Solution:
|
|
def reverseWords(self, s: str) -> str:
|
|
words = s.split()
|
|
words.reverse()
|
|
return " ".join(words) |