Course
Simulator
More
Premium
Log in
Python Function Reference
Functions
update
update
Update the dictionary with the key/value pairs from other, overwriting existing keys.
Python 3.13
1
dict
.
update
(
[
other
]
)
other
Another dictionary or an iterable object.
Examples
Python 3.13
1
2
a
=
{
'x'
:
1
}
a
.
update
(
{
'y'
:
2
}
)
{'x': 1, 'y': 2}