所以我有两本词典。
Dictionary 1 looks like this: {'aaien': ['01, 02, 12'], 'aan': ['10']}
Dictionary 2 looks like this: {'01:': ['pronoun'], '02': ['I'],'03': ['we']}
现在我想写一个函数或代码结合这两个字典,结果应该是:'aaien':['pronoun, I, effect']
这是我到目前为止所得到的:
for word, nums in d1.items():
print word, "->",
for num in nums:
if d2.has_key(num):
print d2[num],
print