3 ms·Usually collections.defaultdict is faster than collections.Counter. But the latter is more concise to use.by d0mine 14y agoUsually collections.defaultdict is faster than collections.Counter. But the latter is more concise to use.