Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

defaultdict in python

"""defaultdict allows us to initialize a dictionary that will assign a 
default value to non-existent keys. By supplying the argument int, 
we are able to ensure that any non-existent keys are automatically 
assigned a default value of 0."""
Source by campus.datacamp.com #
 
PREVIOUS NEXT
Tagged: #defaultdict #python
ADD COMMENT
Topic
Name
4+4 =