道场/惯用法 3 分钟

加权计数

counts.get(label, 0) + weight:没有键时从 0 开始

掌握

0/5

dict.get计数

加权计数

1 / 2

单选考点:空值与零除加权计数

`counts.get(label, 0)` 里的 0 表示什么?