Question: 3. Nesting dictionary (10pts) a. Continue using the dictionaries python file from question 1 b. Create a comment that says question 3 c. Create a

3. Nesting dictionary (10pts) a. Continue using the "dictionaries" python file from question 1 b. Create a comment that says "question 3" c. Create a new variable called "people" where the list is 3 copies of the "person" dictionary i. Ensure you do not make a shadow copy or a pointer reference. Meaning you should be able to edit one of the dictionaries in the list and not have it update any of the other dictionaries ii. Refer to lecture 3 and the conversation about shallow vs deep copy d. Print the value of the "name" key 1st dictionary in the list e. Print the value of the "hobbies" key in the in the 2nd dictionary in the list f. Print the value of the 1st item in the value for the "dogs" key in the "pets" key in the 2nd dictionary in the list g. Add a new hobby to the list in the value of the "hobbies" key in the 3rd dictionary in the list h. The 2nd person in the list of dictionaries just moved to "Rivendell", update the "city" key accordingly i. Delete all the pets in in the 3rd person in the list of dictionaries

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 Programming Questions!