On Apr 6, 11:16 pm, Helmut Jarausch <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I must be blind but I don't see what's going wrong
> with


The reason is:

> G=[[]]*2

is doing a "shallow copy" of the blank list. The corrected code is
either:

G = [[] for _ in xrange(2)]

or

G = [[], []]

btw, this is a very frequently asked question
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to