测试:
leetcode 上提交的:
class Solution:
def reverseLeftWords(self, s: str, n: int) -> str:
s1 = []
s1.append(s[n:])
s1.append(s[:n])
return ("".join(s1))
测试:
leetcode 上提交的:
class Solution:
def reverseLeftWords(self, s: str, n: int) -> str:
s1 = []
s1.append(s[n:])
s1.append(s[:n])
return ("".join(s1))