TypeError: unhashable type: 'list' usually means that you are trying to use a list as an hash argument. This means that when you try to hash an unhashable object it will result an error.
For ex. when you use a list as a key in the dictionary , this cannot be done because lists can't be hashed. The standard way to solve this issue is to cast a list to a tuple . So, in order to fix unhashable type: 'list', you'll have to change your list into tuples if you want to put them as keys in your dictionary .
my_dict = {'name': 'John', tuple([1,2,3]):'values'}
print(my_dict)
The hash() is a built-in python method, used to return a unique number . This can be applied to any user-defined object which won’t get changed once initialized. This property is used mainly in dictionary keys .