Just read the documentation :
If default_factory not None, it is called without arguments to provide a default value for the given key, this value is inserted into the dictionary for the key and returned.
That is, the defaultdict argument is not a default value; it is a function called to get the default value. So simple:
defaultdict(lambda: [0,0])
(There is no need to use list([0,0]) explicitly. [0,0] already a list.)
source share