Skip to main content

merge_dicts

No overview available.

def merge_dicts(
dict1: dict,
dict2: dict
) - > dict

Merges two dictionaries into a single dictionary, where values from the second dictionary overwrite those in the first if keys overlap.

Parameters

NameTypeDescription
dict1dictThe base dictionary containing the initial set of key-value pairs.
dict2dictThe dictionary whose key-value pairs will be added to or update the base dictionary.

Returns

TypeDescription
dictA new dictionary containing the combined key-value pairs from both input dictionaries.