Python 3.8.5 (default, Sep 4 2020, 02:22:02) [Clang 10.0.0 ] :: Anaconda, Inc. on darwin >>> d=dict() >>> l=[1,2,3] >>> d[l]=42 Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unhashable type: 'list'
Apparently there are ways to monkey patch core types, so you could probably add a __hash__ method to list…