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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!