3 ms·
I was replying to this: > The most common use case for default dict is counting the number of occurrences of some string I would assume very few people use de
by remram 6y ago
I was replying to this:
> The most common use case for default dict is counting the number of occurrences of some string
I would assume very few people use defaultdict for this since Counter exists.
- BugsJustFindMe 6y agoOh, yeah, that's legit. Secretly (not secretly anymore, I guess!) I assume that the OP comment was a school homework assignment or something.
- fragmede 6y agoDespite attempts to depreciate Python 2, there's still a lot of code that hasn't been updated to use all of the new language features since Python 3.1, so it's anybody's guess, really. Depends on how much legacy code you interact with.