x = {'a': 1, 'b': {'m': 4, 'n': 5, 'o': 6}, 'c': 3}
u = x.copy()
v = dict(x)
import copy
w = copy.deepcopy(x)
x['a'] = 10
x
u
v
w
x['b']['m'] = 40
x
u
v
w
How to copy a dictionary and only edit the copy