How to shift list indexes by a certain value in Python : <p>I need to create a python function that right shifts values in a list by a given value. </p>

<p>For example if the list is [1,2,3,4] and the shift is 2 it will become [2,3,4,1]. the shift value must be a non negative integer. I can only use the len and range functions. </p>

<p>This is what I have so far</p>

<pre><code>def shift(array, value):
    if value &lt; 0:
        return
    for i in range(len(array)): 
        arr[i] = arr[(i + shift_amount) % len(arr)]
</code></pre>
