List of dictionary is below
l = [
{'firstname': 'joe', 'surname': 'ABCD', 'tile' : 'DE'},
{'firstname': 'john', 'surname': 'DEF', 'tile' : 'BC'},
{'firstname': 'joe', 'surname': 'bloggs', 'tile' : 'DE'},
{'firstname': 'jane', 'surname': 'HH', 'tile' : 'AD'}
]
Need to delete item from l
if firstname
and tile
matches
pseudo code
for i in l:
if i['firstname'] + i['tile'] in l:
l.pop(i)
I have gone through python remove duplicate dictionaries from a list
its removing entire dict matches
Also gone through second answer python remove duplicate dictionaries from a list