New submission from Srinivasan Samuel <creator...@yahoo.com>:

Here is the my direct cut & paste from my Python 3.7.3 Shell
>>> C = 2*[[]]
>>> C
[[], []]
>>> 
>>> M = [[],[]]
>>> M
[[], []]
>>> 
>>> C == M
True
>>> 
>>> M[0].append(5)
>>> M
[[5], []]
>>> 
>>> C[0].append(5)
>>> C
[[5], [5]]
>>> 
>>> C == M
False
>>>

----------
messages: 352945
nosy: pysolo
priority: normal
severity: normal
status: open
title: Why am I getting inconsistent results in this simple List assignment?
type: behavior
versions: Python 3.7

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

Reply via email to