For some reason when I modify mydict2 it changes the contents of mydict
Here is my code:
mydict = {1:'a', 2:'b'}
mydict2 = mydict
mydict2[1] = 'c'
print(mydict2)
If you try this, it outputs {1: 'c', 2: 'b'}
It should output {1: 'a', 2: 'b'}
and when you do print(mydict)
it should output {1: 'c', 2: 'b'}