I have this nested dictionary:
Movies = {1: {'1060277': 'cloverfield', '1877830': 'The Batman', '0117283': 'The Pallbearer'},
2: {'1877830': 'The Batman', '1877321': 'The Yards', '0117283': 'The Pallbearer'},
3: {'6723592': 'Tenet', '1099212': 'Twilight', '1877830': 'The Batman'}}
Now, I want to return a dictionary that has the common key-value pairs from all the dictionaries within the nested dictionary, in this case it would be
--> 1877830 The Batman
as it's the only one that's common to all 3 nested dictionaries.
What I cant seem to figure out is how to compare these dictionaries:
#mov is where Movies will be passed
def Narrow_down(mov):
final_list= mov[1]
for i in final_list.keys():
for x,y in mov.items():
for key in y:
if i==key:
print(i, "is common ")