how i combine twin dictionaries unparalleled countenance python?
i have twin python dictionaries, i wish unparalleled countenance advantage twin dictionaries, merged. update()
slight i need, returned the outcome instead modifying collection in-place.
>>> x = {'a': 1, 'b': 2}
>>> y = {'b': 10, 'c': 11}
>>> z = x.update(y)
>>> print(z)
none
>>> x
{'a': 1, 'b': 10, 'c': 11}
how i final assimilated collection z
, x
?
(to extra-clear, last-one-wins conflict-handling dict.update()
i'm looking well.)
Comments
Post a Comment