Adds key:value elements to the dictionary.
dict. update([mapping])
- mapping
- Required. Either another dictionary object or an iterable of key:value pairs (iterables of length two). If keyword arguments are specified, the dictionary is then updated with those key:value pairs.
None
>>> d = {'a': 1, 'b': 2}
>>> d.update({'a': 'I', 'c': 3})
>>> d
{'a': 'I', 'b': 2, 'c': 3}>>> d = {'a': 1, 'b': 2}
>>> d.update([('x', 10), ('y', 20)])
>>> d
{'a': 1, 'b': 2, 'x': 10, 'y': 20}>>> d = {'a': 1, 'b': 2}
>>> d.update(foo='bar', sn='afu')
>>> d
{'a': 1, 'b': 2, 'foo': 'bar', 'sn': 'afu'}#TODO