Say I have an list list of tuples like this:
a = [(["I", "love", "apples"], "good"),
(["I", "love", "apples"], "good")),
(["I", "hate", "apples"], "bad")),
(["I", "dislike", "apples"], "bad")),]
I want to remove duplicated, but list(set(a))
errors out:
TypeError: unhashable type: 'list'
Is there any pythonic way to remove duplicates from this type of list