Question: I need to write an expression that computes which keys are shared between the following two dictionaries and stores it in the variable named shared
I need to write an expression that computes which keys are shared between the following two dictionaries and stores it in the variable named sharedkeys. In addition, need to write an expression that computes which values are shared between the two dictionaries and store the information in variable sharedvalues. hint: use set intersection to store the group of shared keys in a Python set
dicta: b: c: d: e:
dictc: d: e: f: g:
sharedvalues x:dictx for x in dict if x in dict
My code is failing and Im not sure where to go from here.
Please help!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
