hi, i have a list which contains duplicate dictionaries. how do i extract the unique items out?
l1 = [{'a': 'ddd'}, {'a': 'ddd'}, {'b': 'eee'}, {'c': 'ggg'}]
set(l1)
TypeError: dict objects are unhashable
but,
>>> {'a': 'ddd'} == {'a': 'ddd'}
True
>>>
david
Fancy a job? - http://www.tiscali.co.uk/jobs/
__________________________________________
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor
