Let's say I have a list L1.
I then define a function that passes L1 as an argument. This function does something like sort or append it, and returns the modified list. So I call the function with L1 and assign the result to variable a. Will L1 also be affected by this? I know that two variables can point to the same object and therefore affecting the object through one variable will affect the other variable as well, but I did not expected it happen even if the scope is different. Can someone explain?