Computer Science, asked by kshitizshreyashkar, 7 months ago

1 point
3. The dict.update method updates one dictionary with the items coming from the other dictionary, so that existing entries are
replaced and new entries are added. What is the content of the dictionary 'wardrobe“ at the end of the following code?
1
2
wardrobe {'shirt': ['red', 'blue', 'white'], 'jeans': ['blue', 'black']},
new_items {'jeans': ['white'], 'scarf': [ 'yellow"], 'socks': [ 'black', 'brofun']}
wardrobe.update(new_items)
3​

Answers

Answered by VEDCR7
7

Answer:

I can't get any thing bro to mess

Answered by sangeetapradhan62
3

Answer:

{'shirt': ['red', 'blue', 'white'], 'jeans': ['white'], 'scarf': ['yellow'], 'socks': ['black', 'brown']}

Explanation:

After updating the new_items in the wardrobe, the existing entries are replaced with the new entries. since there is no update in the new_items for shirt it will remain unchanged and rest all items are added and modified.

Similar questions