I only want to update 1 dictionary value in a dictionary, but it seems to update the union of 2 keys:
Y = dict(zip(['A', 'B'], [dict.fromkeys(range(2010,2014), [])] * 2))
zz = {'A':{2012: [(666,999)], 2013: []}, 'B':{2010:[], 2011:[(666,999)]}}
Y['A'][2012] = zz['A'][2012]
Result:
{'A': {2010: [], 2011: [], 2012: [(666, 999)], 2013: []}, 'B': {2010: [], 2011: [], 2012: [(666, 999)], 2013: []}}
I only want to update 2012 of 'A'.
I am a beginner python programmer.
Thanks