May-04-2018, 09:24 AM
You could probably gain a little more with
from functools import partial struct = defaultdict(partial(defaultdict, int))instead of lambda.