4 ms·
defaultdict is really multipurpose, quick trees is only one of the neat tricks. I like the following definition :) >>> Tree = lambda: defaultdict(Tree)
by hcarvalhoalves 13y ago
defaultdict is really multipurpose, quick trees is only one of the neat tricks. I like the following definition :)
>>> Tree = lambda: defaultdict(Tree)