📅  最后修改于: 2022-03-11 14:46:26.737000             🧑  作者: Mango
def shift(key, array):
counter = range(len(array)-1)
new = counter
for i in counter:
new[i] = array[i-key]
return new
print shift(1, [5, 6, 7])