def rotate(l,k,n): l=[1,2,3,4,5,6,7,8] l2=l[-(k%len(l))::1] print(l2+[i for i in l if i not in l2 ])
میتونید لیست را تغییر دهید