假设将单词保存在变量 word 中,使用一个字典类型 counts={},统计单词出现的次数可采用以下代码:(1.
(A)counts[word] = count[word] + 1
(B)counts[word] = 1
(C)counts[word] = count.get(word,1) + 1
(D)counts[word] = count.get(word,0) + 1
参考答案
继续答题:下一题
(A)counts[word] = count[word] + 1
(B)counts[word] = 1
(C)counts[word] = count.get(word,1) + 1
(D)counts[word] = count.get(word,0) + 1