title: How does modifying lists in different scopes work?
body: <p>Let's say I have a list L1.</p>
  <p>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?</p>