剑指offer58左旋字符串


# coding:utf-8
"""
Name : 剑指offer58.py
Author  : qlb
Contect : 17801044486@163.com
Time    : 2021/2/7 14:14
Desc: 左旋字符串
"""

class Solution:
    def reverseLeftWords(self, s: str, n: int) -> str:
        s = list(s)
        s = s[n:] + s[:n]
        return ''.join(s)