osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Implement C's Switch in Python 3


>
> I have an unhashable type list.
>

Try replacing the list with a tuple. Also, read up on immutable v mutable
types and dictionary keys for a bit of background on why a list won't work.

Skip

>