使用场景:涉及两个字典的合并时
实例:

>>> D1 = {'one':1, 'two':2}
>>> D2 = {'three':3}
>>> D1.update(D2)
>>> D1
{'one': 1, 'two': 2, 'three': 3}
>>> D1 = {'one':1, 'two':2}
>>> D1.update(three=3)
>>> D1
{'one': 1, 'two': 2, 'three': 3}
扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。