New submission from kewlar <bolshe...@bk.ru>:

>>> a = [[0,0,0],[0,0,0],[0,0,0]]
>>> a
[[0, 0, 0], [0, 0, 0], [0, 0, 0]]
>>> a[1][1] = 1
>>> a
[[0, 0, 0], [0, 1, 0], [0, 0, 0]]
>>> b = [[0]*3]*3
>>> b
[[0, 0, 0], [0, 0, 0], [0, 0, 0]]
>>> b[1][1] = 1
>>> b
[[0, 1, 0], [0, 1, 0], [0, 1, 0]]
>>>

----------
messages: 92869
nosy: nutregina
severity: normal
status: open
title: list
type: performance
versions: Python 2.6, Python 3.0

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

Reply via email to