In How to hash lists? I was told that I should convert to a tuple first, e.g. [1,2,3,4,5] to (1,2,3,4,5).
[1,2,3,4,5]
(1,2,3,4,5)
So the first cannot be hashed, bu
Not every tuple is hashable.For example tuple contains list as an element.
x = (1,[2,3]) print(type(x)) print(hash(x))