Created
December 8, 2020 17:37
-
-
Save cjlovering/dcbdf9850648d4c4e89ae7947ceed255 to your computer and use it in GitHub Desktop.
Build a DefaultDict directly.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import DefaultDict | |
x = {"1": 1, "2": 2} | |
DefaultDict(int, x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment