I need to eliminate duplicates from a list of list like this one:
list = [[10, 5, 3], [10, 5, 3], [10, 10, 3], [10, 10], [3, 3, 3], [10, 5, 3]]
As a expected result:
result_list = [[10, 5, 3], [10, 3], [10], [3]]
Eliminating duplicates inside sub-lists and in the main list, would it be possible? I tried with:
result_list = [list(result) for result in set(set(item) for item in list)]
but throws an TypeError saying that a set is a unhashable type
I think it was not a duplicated question, i need to remove the duplicates within the sublists, not just in the main list. Thanks to everyone who helped me, problem solved.