题解 | #左旋转字符串#
左旋转字符串
http://www.nowcoder.com/practice/12d959b108cb42b1ab72cef4d36af5ec
-- coding:utf-8 --
class Solution:
def LeftRotateString(self, s, n):
# write code here
s1 = s[:n]
s2 = s[n:]
return s2 + s1
string slicing