[issue27813] When I assign for a item which list of single item

Martin Panter report at bugs.python.org
Sat Aug 20 06:22:43 EDT 2016


Martin Panter added the comment:

Original post:

“When I assign for a item which list of single item, it seems can't set a value for item which I want to.”

See the FAQ entry <https://docs.python.org/3.5/faq/programming.html#how-do-i-create-a-multidimensional-list>. When you multiply a list, each outer item is actually just reference to the same inner list object.

----------
nosy: +martin.panter
resolution:  -> not a bug
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27813>
_______________________________________


More information about the Python-bugs-list mailing list