title: cannot understand why deleting content of a list will delete also the content of the list from which it originates (Python)
body: <p>I fail to understand one of the result of this code – and especially what should I do as a "workaround":</p>
  
  <pre><code>#!/usr/bin/env python
  
  a = [1, 2, 3]
  b = a
  
  print (a)    # &gt;&gt; gives [1, 2, 3]    # &gt;&gt; expected
  print (b)    # &gt;&gt; gives [1, 2, 3]    # &gt;&gt; expected
  
  b.clear()
  
  print (a)    # &gt;&gt; gives []    # &gt;&gt; ??
  print (b)    # &gt;&gt; gives []    # &gt;&gt; expected
  </code></pre>
  
  <p>Q1: Why is <code>a</code> also cleared ?</p>
  
  <p>Q2: What should I do if I want to keep <code>a</code> as a sort of "template", so that, once set, do operations/modifications only on copies of it, without care about affecting the "original" in any way ?</p>
  
  <p>(happens the same if <code>a</code> is a dictionary; happens the same if using <code>del b[:]</code> instead of <code>b.clear()</code>)</p>