I have a list of dicts, and I\'d like to remove the dicts with identical key and value pairs.
For this list: [{\'a\': 123}, {\'b\': 123}, {\'a\': 123}]<
[{\'a\': 123}, {\'b\': 123}, {\'a\': 123}]
i know it might not be as elegant as other answers,but how about trying this:
arts = list of dicts arts_alt = [] arts_alt = [arts_alt.append(art) for art in arts if art not in arts_alt]
arts_alt is what you need