I am having a list of lists :
mat = [[1,2,3],[4,5,6],[1,2,3],[7,8,9],[4,5,6]]
and I want to convert into a set i.e. remove the repeating lists and creating a new list out of it which will only contain the unique lists.
In above case the required answer will be
[[1,2,3],[4,5,6],[7,8,9]]
But when I do set(mat)
, it gives me error
TypeError: unhashable type: 'list'
Can you please solve my problem. Thanks in advance!