字典合并问题
>>> x = {'a':1, 'b': 2}
>>> y = {'b':10, 'c': 11}
>>> z = x.update(y)
>>> print z
None
>>> x
{'a': 1, 'b': 10, 'c': 11}解决方法一
z = dict(x.items() + y.items())>>> z = dict(list(x.items()) + list(y.items()))解决方法二
z = x.copy()
z.update(y)Last updated