how to move the element of an array in python by one step
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])
Are there any code examples left?
New code examples in category Python