Update method in Python dictionary

I was trying to update values in my dictionary, I came across 2 ways to do so:

What is the difference between them?

The difference is that the second method does not work:

dict.update() expects to find a iterable of key-value pairs, keyword arguments, or another dictionary:

Update the dictionary with the key/value pairs from other, overwriting existing keys. Return None.

update() accepts either another dictionary object or an iterable of key/value pairs (as tuples or other iterables of length two). If keyword arguments are specified, the dictionary is then updated with those key/value pairs: d.update(red=1, blue=2).

map() is a built-in method that produces a sequence by applying the elements of the second (and subsequent) arguments to the first argument, which must be a callable. Unless your key object is a callable & the value object is a sequence, your first method will fail too.

Demo of a working map() application:

Here map() just produces key-value pairs, which satisfies the dict.update() expectations.