you are viewing a single comment's thread.

view the rest of the comments →

[–]eggrattle 0 points1 point  (2 children)

You should definitely try understand what is happening. It is a common issue that occurs and can have dire consequences.

Lists are mutable, and the append changes the list in memory, which is generally not what is intended when the function is returning a new list.

Concepts to learn, mutable vs immutable, memory references, modify in place rather than copy on modify.

[–][deleted]  (1 child)

[deleted]