ID EN
Collections

defaultdict

Python 3.11

Return a new dictionary-like object. defaultdict is a subclass of the built-in dict class. It overrides one method and adds one writable instance variable. The remaining functionality is the same as for the dict class and is not documented here.

Syntax

PYTHON
class collections.defaultdict(default_factory=None, /[, ...])

See Also

defaultdict dict dict default_factory dict defaultdict dict default_factory