This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients nanthil, steven.daprano
Date 2018-05-24.14:38:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527172718.88.0.682650639539.issue33636@psf.upfronthosting.co.za>
In-reply-to
Content
This is not a bug, it is the documented behaviour: the * operator does not copy the lists, it duplicates references to the same list. There's even a FAQ for it:

https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list
History
Date User Action Args
2018-05-24 14:38:38steven.dapranosetrecipients: + steven.daprano, nanthil
2018-05-24 14:38:38steven.dapranosetmessageid: <1527172718.88.0.682650639539.issue33636@psf.upfronthosting.co.za>
2018-05-24 14:38:38steven.dapranolinkissue33636 messages
2018-05-24 14:38:38steven.dapranocreate