A dumb question after searching for Python Doc, for the constructor of defaultdict, there is only one parameter, which is type of value. Is there a way to specify type of key? I read a few samples and it seems no one specify type of key, and they just specify type of value. And whether it is needed or not -- interested to learn why defaultdict just needs to specify type of value.
thanks in advance, Lin