From: fmwang at mediaone.net (Fuming Wang)
Date: Fri, 23 Apr 1999 11:14:49 -0400
Subject: Bug or Feature?
Message-ID: <37208E69.4B022E0C@mediaone.net>
X-UID: 1286                                                  

Hi,

I found this little surprise with Python 1.5.1:


>list = [[0]*2]*4
>list
[[0, 0], [0, 0], [0, 0], [0, 0]]
>list[0][1] = 9
>list
[[0, 9], [0, 9], [0, 9], [0, 9]]

Is this a bug or a feature that I don't know about?

Fuming




