I'm having a very weird problem with my python now and I don't know if it's a bug or not.
When I have a list l = ["a", "b"]
,
And i assign that list to another variable:
other = l
,
and then try to .remove
or .pop
something from other
, l
changes with it.
So if I were to do other.remove("a")
, both other
and l
only contain ["b"]
, As if I was passing the list by reference.
Is this intended behavior?