Mutability was by far the most difficult thing when learning Python and mutating objects by iterating over its items do get confusing, even as a senior.
When I was first learning I thought all methods would mutate. It has a certain logic to it
When I was first learning I thought all methods would mutate. It has a certain logic to it