先上程序G锉;裰Α!骇笔!
切片并連接字符or字符串循環(huán)左移
s=str(raw_input('Please input the string:'))
n=int(input('Please input the non-negative integer:'))
front=s[0:n:1]
tail=s[n: :1]
new_s=''.join([tail,front])
print(new_s)
嘻嘻省店,簡(jiǎn)單第一步,再接再厲~
先上程序G锉;裰Α!骇笔!
s=str(raw_input('Please input the string:'))
n=int(input('Please input the non-negative integer:'))
front=s[0:n:1]
tail=s[n: :1]
new_s=''.join([tail,front])
print(new_s)
嘻嘻省店,簡(jiǎn)單第一步,再接再厲~