[issue45265] Bug in append() method in order to appending a temporary list to a empty list using for loop

Raymond Hettinger report at bugs.python.org
Wed Sep 22 14:08:45 EDT 2021


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

This is expected behavior.

To get a better understanding, see:  https://docs.python.org/3/faq/programming.html#why-did-changing-list-y-also-change-list-x

To get help writing correct code, please do not use the bug tracker.  Consider posting to StackOverflow instead.

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

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45265>
_______________________________________


More information about the Python-bugs-list mailing list