"Meo" <[EMAIL PROTECTED]> writes: > Somebody understand what's going on here?
Yes, []*3 gives you three references to the same empty list, not three
separate empty lists. You need something like
[[] for i in xrange(3)]
to get separate lists.
Another example:
a = [1,2,3]
b = a
a[0] = 5
print b # prints [5,2,3]
Do you understand now?
--
http://mail.python.org/mailman/listinfo/python-list
