method update python code example
Example: .update python
z = {1: 'One', 2: 'Two'}
x = {0: 'zero', 1: 'one'}
x.update(z) # adds anything new to the dict
print(x)
{0: 'zero', 1: 'One', 2: 'Two'}
z = {1: 'One', 2: 'Two'}
x = {0: 'zero', 1: 'one'}
x.update(z) # adds anything new to the dict
print(x)
{0: 'zero', 1: 'One', 2: 'Two'}