New submission from Wen Hao <haowenqi...@gmail.com>:

>>>mat = [[0]*4]*4
>>> mat
[[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
>>> mat[1][2]=1
>>> mat
[[0, 0, 1, 0], [0, 0, 1, 0], [0, 0, 1, 0], [0, 0, 1, 0]]

----------
components: Build
messages: 389230
nosy: haowenqi.zz
priority: normal
severity: normal
status: open
title: array assignment error
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43581>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to