title: Python updating different variable instead of assigned reference variable
body: <p>Solution: <code>test_dict = copy.deepcopy(DICT)</code>
  Thank you, my fellow gamers. May ease of debugging grace you in the future.</p>
  <p>I create a copy of a dictionary, I append change to new variable.
  Change appears in old variable instead.</p>
  <pre><code>CHARACTERS = ['A', 'G', 'T', 'C', 'C', 'A', 'G', 'T', 'G', 'T', 'A', 'A']
  DICT = {'key1': &quot;foo&quot;, 'key2': &quot;bar&quot;, 'key3': CHARACTERS}
  
  def test(self):
      test_dict = DICT.copy()  # first reference of 'test_dict'
      print(&quot;DICT before&quot;, DICT)
      test_dict['sequence'] += ['G']
      print(&quot;DICT after &quot;, DICT)
  </code></pre>
  <p>Output:</p>
  <pre><code>DICT before {'key1': &quot;foo&quot;, 'key2': &quot;bar&quot;, 'key3': ['A', 'G', 'T', 'C', 'C', 'A', 'G', 'T', 'G', 'T', 'A', 'A']}
  DICT after  {'key1': &quot;foo&quot;, 'key2': &quot;bar&quot;, 'key3': ['A', 'G', 'T', 'C', 'C', 'A', 'G', 'T', 'G', 'T', 'A', 'A', 'G']}
  </code></pre>
  <p>The letter 'G' is appended to both DICT and test_dict.</p>
  <p>Totally spoopy, if you ask me.</p>
  <p>Update: I've tried the suggested: <code>test_dict = DICT.copy()</code> but with no luck. What am I doing wrong in the above updated code that includes this?</p>