python defaultdict
from collections import defaultdict
使用defaultdict设置默认值
defaultdict 对参数为python 中对list 、 str、 set、 int 等常见参数
而且支持匿名函数
my_defaultdict = defaultdict(lambda: [])
from collections import defaultdict
使用defaultdict设置默认值
defaultdict 对参数为python 中对list 、 str、 set、 int 等常见参数
而且支持匿名函数
my_defaultdict = defaultdict(lambda: [])