Let's say I have
a = [1,2,3,4,5]
I'm trying to create a dictionary where
dictObj = { (key,[]) for key in a}
but I'm getting an unhashable type error. This seems weird to me since it's fine if values are lists right? I was wondering if anyone could tell me the correct syntax for creating a hash table where all the keys are the elements in a and each key points to an empty array.
collections.defaultdict(list)?