Left rotation string -python

Ideas: the left n bits is n bits prior to the string to move

# -*- coding:utf-8 -*-
class Solution:
    def LeftRotateString(self, s, n):
        # write code here
        return s[n:] + s[:n]

Guess you like

Origin www.cnblogs.com/dolisun/p/11332592.html