2、Python 3.5 或更高版本使用**
x = {'C': 11, 'Java': 22}
y = {'Python': 33, 'CJavaPy': 44}
z = {**x, **y}
print...(x , y, z))
5、性能测试
from timeit import repeat
from itertools import chain
x = dict.fromkeys('https://www.chuchur.com...dict_args:
result.update(dictionary)
return result
print(min(repeat(lambda: {**x, **y},number...(lambda: dict(chain(x.items(), y.items())),number=1)))
print(min(repeat(lambda: dict(item for d in (x..., y) for item in d.items()),number=1)))