list1 = [
{'A':'a','B':'b','C':'c'},
{'A':'aa','B':'bb','C':'cc'},
{'A':'aaa','B':'bbb','C':'ccc'}
]
list2 = [
{'A':'a','B':'b','C':'c'},
{'A':'aa','B':'bb','C':'cc'},
{'A':'aaa','B':'bbb','C':'ccc'}
]
I have 2 such list of dict (ex) , I want to compare each key of both lists, means A of dict1 1st list with A of dict1 2nd list , A of dict2 of list1 to A of dict2 of list2 similarly I have to check all the keys, but my expected output is
{'A':True , 'B':True , 'C':True} Means if all the A match with each other from both the dict it will return true and even If one do not match it will written as false
( ex in dict2 of list 1 if value of say 'B' is 'bb' if that do not match with dict2 of list 2 then B will be false if all all other B are matching in other dict