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! tmp = {} final_dct = [] tmp = get_data(x, y, z) final_dct.append(dict(tmp_dct) final_dct.append(copy.deepcopy(tmp)) final_dct.append(tmp).copy() 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! 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? By the way Deep copy is supported by Python 3.8.3 while Colab is still in python 3.6 Continue reading...