There are two dictionaries
x={1:['a','b','c']}
y={1:['d','e','f'],2:['g']}
I want another dictionary z which is a merged one of x and y such that
z = {1:['a','b','c','d','e','f'],2:['g']}
Is it possible to do this operation?
I tried update operation
x.update(y)
But it gives me the following result
z= {1:['d','e','f'],2:['g']}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…