[newbie] confused about following list assignment

Richard Brodie R.Brodie at rl.ac.uk
Fri Feb 27 08:06:14 EST 2004


"Kenny" <kccw at well.ox.ac.uk> wrote in message
news:Pine.LNX.4.43.0402271233330.17064-100000 at zeon.well.ox.ac.uk...

> Can someone explain why all the position zeros are being assigned the same
> value of x?

because a is [ b, b, b, b, b]. This bites almost everyone at some point.
See http://zephyrfalcon.org/labs/python_pitfalls.html for some newbie
traps, particularly section 2.





More information about the Python-list mailing list