#A为原始列表,a为左移位数 def list_move_left(A,a): for i in range(a): A.insert(len(A),A[0]) A.remove(A[0]) return A
#A为原始列表,a为右移位数 def list_move_right(A,a): for i in range(a): A.insert(0,A.pop()) return A