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 Yaowei Zhang
Recipients Yaowei Zhang
Date 2017-02-17.02:03:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487297025.75.0.614273224132.issue29584@psf.upfronthosting.co.za>
In-reply-to
Content
#If we define a list by:
nums = [[0]*3]*3
#nums = [[0,0,0],[0,0,0],[0,0,0]]
nums[0][1] = 1
print(mums)
# the result is
[[0,1,0],[0,1,0],[0,1,0]]
#I think it is because all the line use the same list variable, but it suppose #not.
History
Date User Action Args
2017-02-17 02:03:45Yaowei Zhangsetrecipients: + Yaowei Zhang
2017-02-17 02:03:45Yaowei Zhangsetmessageid: <1487297025.75.0.614273224132.issue29584@psf.upfronthosting.co.za>
2017-02-17 02:03:45Yaowei Zhanglinkissue29584 messages
2017-02-17 02:03:45Yaowei Zhangcreate