剑指offer58左旋字符串
时间:2021-02-08 12:34:26
收藏:0
阅读:0
# 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)
评论(0)