Python List Values being assigned to each other
<p>I'm having a problem writing the following code: </p>

<pre><code>D = [
        [0,3,8,999,-4],
        [999,0,999,1,7],
        [999,4,0,999,999],
        [2,999,-5,0,999],
        [999,999,999,6,0]
    ]

def FloydWarshall (W):
    matrices = [W[:]]
    pred = [W[:]]

    print (matrices is pred)
    print (pred is matrices)
    print (pred is W)
    print (matrices is W)

    for i in range(0,len(pred[0])):
        for j in range(len(pred[0][i])):

            if pred[0][i][j] != 999 and pred[0][i][j] != 0:
                pred[0][i][j] = i +1
            else:
                pred[0][i][j] = False 

    return (matrices,pred)
FloydWarshall(D)
</code></pre>

<p>the values that are being returned are the exact same matrices, why is this? The print statement say that they are not pointers to the same spot in memory, correct? </p>
