有人可以指出我哪里出错了,这里到底发生了什么,除了继续或解决这个问题的更好方法。
dic = {'arun': 123213, 'hari': 31212, 'akila': 321, 'varun': 12132, 'apple': 3212}
u1 = {'arun': 123123, 'orange': 1324214}
u2 = {'akila': 1234124, 'apple': 123123}
u3 = {'hari': 144}
u4 = {'anna': 23322}
for key, value in dic.iteritems():
try:
A = u1[key]
B = u2[key]
C = u3[key]
D = u4[key]
except KeyError:
continue
print A, B, C, D # fails to print