Question: Write a function update_dict2 (dict2, key1, key2, value), wheredict2 is a two-level dictionary; key1 is the first-level key; key2 is the second-level key; and value
Write a function update_dict2(dict2, key1, key2, value), wheredict2 is a two-level dictionary; key1 is the first-level key; key2 is the second-level key; and value is a value to be stored at dict2[key1][key2]. This function should modify dictionary dict2 so that the following holds:
dict2[key1][key2] == value
The function returns dict2.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
