Unable to remove duplicate dicts in list using list comprehension or frozenset
问题 I would like to remove duplicate dicts in list. Specifically, if two dict having the same content under the key paper_title, maintain one and remove the other duplicate. For example, given the list below test_list = [{"paper_title": 'This is duplicate', 'Paper_year': 2}, \ {"paper_title": 'This is duplicate', 'Paper_year': 3}, \ {"paper_title": 'Unique One', 'Paper_year': 3}, \ {"paper_title": 'Unique two', 'Paper_year': 3}] It should return return_value = [{"paper_title": 'This is duplicate'