title: what does lst[:] = [1,2,3] mean?
body: <p>I'm a little bit confused. What exactly does [:] in this code do when used with an assignment?</p>
  <pre><code>l1 = [1, 2, 3]
  l2 = [1, 2, 3]
  
  def test(l1, l2):
      l1 = [0]
      l2[:] = [0]
  
  test(l1, l2)
  # l1 = [1, 2, 3]
  # l2 = [0]
  </code></pre>
  <p>When I use l2[:] = [0], is it like:</p>
  <pre><code>def test(l1, l2):
      global l1
      l1 = [0]
      l2 = [0]
  </code></pre>
  <p>Or does it have another meaning?
  Thank you!</p>