append command in python
<p>I have a bit of code which I think is correct. However, it should return a vector of values but it returns a single cumulated value instead. </p>

<pre><code>pExact = 0.8
pOvershoot = 0.1
pUndershoot = 0.1

def move(p, U):
    q = []
    for i in range(len(p)):
        s = pExact * p[(i - U) % len(p)]
        s = s + pOvershoot * p[(i - U - 1) % len(p)]
        s = s + pUndershoot * p[(i - U + 1) % len(p)]

        print i, s  # check if calculations are corrects
    q.append(s)

    return q        # should return a vector

p = [0, 1, 0, 0]
print move(p, 1)    # prints only cumulated value
</code></pre>

<p>I try to understand why it prints only one value <code>[0.10000000000000001]</code> not a vector <code>[0, 0.1, 0.8, 0.1]</code> how I think it should.</p>
