title: How to use deepcopy python/colab
body: <p>My application generates a data frame multiple times and I want to save it in a list (append).
  The problem is at the end when I print the content of all dictionaries in the list I find out that they are all the same and are equal to the last dictionary I appended to the list?  In other words, the list entries has pointers to the generated dictionary memory and as a result at the end all entries are pointing to the same dictionary that I generated last! </p>
  
  <pre class="lang-py prettyprint-override"><code>tmp = {}
  final_dct = []
  tmp = get_data(x, y, z)
  </code></pre>
  
  <ol>
  <li>final_dct.append(dict(tmp_dct)</li>
  <li>final_dct.append(copy.deepcopy(tmp))</li>
  <li>final_dct.append(tmp).copy()</li>
  </ol>
  
  <p>In all the above 3 scenarios, when I print(final_dct) I get all list entries have the same dictionary value that I generated last!</p>
  
  <p>Conceptually I understand shallow vs deep copy but all the above 3 implementations effectively are shallow copy?  Can you please help by telling me how to solve this problem?</p>
  
  <p>By the way Deep copy is supported by Python 3.8.3 while Colab is still in python 3.6</p>