Your question is Merge Dictionaries in Python. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
ADP Workforce Now may combine default and employee-specific configuration values before processing a request. Implement a function that merges two Python dictionaries into a new dictionary.
If both dictionaries contain the same key, the value from updates must override the value from defaults. Do not modify either input dictionary. This is a shallow merge, so nested dictionaries should be treated as ordinary values rather than merged recursively.
Implement merge_dicts(defaults, updates).
updates.defaults and updates unchanged.def merge_dicts(defaults, updates):