dict_c = {1: {2: 3}, 4: 5}
dict_d = dict_c.copy()
dict_d[4] = 9
dict_d[1][2] = 9
print(dict_c)
Answer:
{1: {2: 9}, 4: 5}
Why is the output not {1: {2: 9}, 4: 9} instead? I just started coding and one of the practice I came across this question, thank you so much for the help