I searched for the answer to my question and found that many said to try set(my_list)
, but in my case (I have lists within a list) python throws an error:
Traceback (most recent call last):
File "E:/Users/Rene/PycharmProjects/vaip/Main.py", line 17, in <module>
set(punktid)
TypeError: unhashable type: 'list'
So my question is, how can I find and remove duplicates in a list like this:
my_list = [[0, 3], [3, 4], [5, 6], [9, 2], [0, 3]]