Leetcode 剑指 Offer 58 - II. 左旋转字符串 LCOF - Python
class Solution: def reverseLeftWords(self, s: str, n: int) -> str: m = len(s) temp = list(s) temp.extend(['']*n) front, rear = 0, m for i in range(0,n): temp[rear] = temp[front] rear