I think this is addressed somewhere in a python Gotchas list. These
lists're huge, but if you scan thru these every once in a while,
they're big timesavers:
http://www.ferg.org/projects/python_gotchas.html
http://zephyrfalcon.org/labs/python_pitfalls.html
http://zephyrfalcon.org/labs/beginners_mi
yes,
thank you for your help
--
http://mail.python.org/mailman/listinfo/python-list
"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