1. 题目
2. 分析
这题要是用Python写,就非常简单了。
3. 代码
class Solution:
def reverseWords(self, s: str) -> str:
s = " ".join(reversed(s.strip().split()))
return s
嵌入式进阶——LED呼吸灯(PWM)
阅读 20
2024-05-27
这题要是用Python写,就非常简单了。
class Solution:
def reverseWords(self, s: str) -> str:
s = " ".join(reversed(s.strip().split()))
return s
相关推荐
精彩评论(0)