title: Why can't I modify a list (as a whole) inside a function?
body: <p>I try modifying the list <code>li</code> with function <code>abc</code></p>
  <pre><code>li = [0, 0]
  def abc(x):
      li = 8
  
  abc(5)
  li
  </code></pre>
  <p>which returns <code>[0, 0]</code>. On the other hand,</p>
  <pre><code>li = [0, 0]
  def abc(x):
      li[0] = 8
  
  abc(5)
  li
  </code></pre>
  <p>returns <code>[8, 0]</code>. Could you please explain why such <em>micro</em> modification takes effect?</p>