Pablo Galindo Salgado <pablog...@gmail.com> added the comment:

Hi Devor,

This is not a bug in Python but indeed documented behavior. When you do

p=l

you are creating a new reference to the same list ([2,3,4]), so changing one 
changes the other. If you want to make a copy you can do

p = l.copy()

----------
nosy: +pablogsal
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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

Reply via email to