Aug-21-2020, 02:27 PM
Because lists are mutable. As you've been told above, the elements of a set must be hashable. Mutable things are not hashable, because if you were to mutate them, their hash value would change meaning they'd end up being in the wrong bucket in the table (of course, you could move them, but it would likely affect performance).