import openpyxl
a = {'A': [2136, 1888, 2102, 1911, 1966], 'B': [123, 698, 2564]}
b = {'A': [2136, 1695, 2102, 1888]}
for key in a.keys():
for bkey in b.keys():
if bkey == key:
for i in b[bkey]:
a[key].append(i)
print(a)
格式如上,註意對齊