5 ms·
When to Use Dict.get in Python
- kwertyoowiyop 5y agoWould defaultdict be appropriate for these situations?
- chthonicdaemon 5y agoVery good intuition - defauldict seems to be the best option if you have control over the building of the dictionaries and you think missing value handling is in play. I've updated the post to reflect this.