I have a python list of dictionaries which could be something like:
l = [{'id': 'scissor'}, {'id': 'cloth'}, {'id': 'scissor'}]
Now, I was wondering if there is an efficient way to remove duplicates from this list. So the result should be something like:
r = [{'id': 'scissor'}, {'id': 'cloth'}]
I tried using frozenset
but the dictionary type cannot be hashed. Is there an efficient way to do this from any structures in the python library?
EDIT The items are considered duplicate if the dict are completely the same.