Python: update() method of dictionary

src: datascience dojo

In Python, you can use the update() method to update a dictionary with key-value pairs from another dictionary or an iterable of key-value pairs. The syntax for using the update() method is as follows:

my_dict.update(other_dict)

or

my_dict.update(iterable)