[issue40123] append() works not correct

Rémi Lapeyre report at bugs.python.org
Tue Mar 31 06:05:20 EDT 2020


Rémi Lapeyre <remi.lapeyre at henki.fr> added the comment:

Hi merli, there is no bug here, you always append the same list to Liste so when modifying it you override previous values. You could make a copy of it by using `Liste.append(list(StringL))` instead of `Liste.append(StringL)` and you would get the behaviour you expect.


Please ask questions in python-help or in StackOverflow for questions related to Python usage.

----------
nosy: +remi.lapeyre

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


More information about the Python-bugs-list mailing list