Wolfgang, thank you very much for your reply. Following the example in the link, the problem appears:
>>> A = [[0]*2]*3 >>> A [[0, 0], [0, 0], [0, 0]] >>> A[0][0] = 5 >>> A [[5, 0], [5, 0], [5, 0]] Now, if I use a numpy array: >>> d=array([[0]*2]*3) >>> d array([[0, 0], [0, 0], [0, 0]]) >>> d[0][0]=5 >>> d array([[5, 0], [0, 0], [0, 0]]) What is the difference here? Thank you, -- https://mail.python.org/mailman/listinfo/python-list