title: How to assign another list to a list "passed by reference"?
body: <p>It is believed that lists in python as a mutable object are passed by reference. However when I try to change the list passed to a function to be assigned by another list, particularly empty list, the change is not observable in the caller.</p>
  
  <p>Giving more details here is my code:</p>
  
  <pre><code>def callee(l):
    l = list() # this could be any list but my interest was empty list
  
  def caller():
    l = [1, 2, 3]
    caller(l)
    print(l) # prints [1, 2, 3] while I expect an empty list
  </code></pre>
  
  <p>How can I remove all elements of a list in the callee function?</p>
  
  <p>When I change one particular element of a list in the callee, it is observable in the caller. What kind of passing is this, call-by-value or call-by-reference? I believe neither and I appreciate any clarification on this too.</p>