def func(m): for k,v in m.items(): m[k+2] = v+2 m = {1:2, 3:4} l = m l[9] = 10 print(l) print(m) # func(l) m[7] = 8 print(l) print(m)