摘要: defaultdict 需要构造类似{k1: {v11, v12, v13, ...}, k2: {v21, v22, v23, ...}, ...}结构的数据时,可以用collections.defaultdict: from collections import defaultdict a = 阅读全文
posted @ 2022-09-07 17:26 小鱼圆又圆 阅读(57) 评论(0) 推荐(0)