New submission from Yaowei Zhang:
#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.
--
components: +Build
Changes by Yaowei Zhang :
--
components: Library (Lib)
nosy: Yaowei Zhang
priority: normal
severity: normal
status: open
title: 2D list with Bugs when defined by using Multiplication
versions: Python 3.5
___
Python tracker
<http://bugs.python.