內部字典中的值,我有兩個字典,包含列表數組值是這樣的:合併兩個列表,基於關鍵
d1 = {'1':[12,32,44,12,34],'2':[21,34,11,65],'3':[44,12,98],'4':[65,71]}
d2 = {'1':[15,11,44,42,14],'2':[11,24,41,65]:'3':[41,22,48]}
我該如何合併兩個字典成一個字典基於他們相似的關鍵,所以答案是這樣的:
d3 = {'1':[12,32,44,12,34,15,11,44,42,14],'2':[21,34,11,65,11,24,41,65],'3':[44,12,98,41,22,48],'4':[65,71]}