1 题目描述
2 解题思路
emm,没啥思路。一行搞定
class Solution:
def truncateSentence(self, s: str, k: int) -> str:
return(" ".join(s.split()[:k]))
emm,没啥思路。一行搞定
class Solution:
def truncateSentence(self, s: str, k: int) -> str:
return(" ".join(s.split()[:k]))