I am trying to remove the duplicates from following list
distinct_cur = [{\'rtc\': 0, \'vf\': 0, \'mtc\': 0, \'doc\': \'good job\', \'foc\': 195, \'st\': 0
One liner to deduplicate the list of dictionaries distinct_cur on the primary_key of doc
distinct_cur
doc
[i for n, i in enumerate(distinct_cur) if i.get('doc') not in [y.get('doc') for y in distinct_cur[n + 1:]]]