A-A+

设将单词保存在变量wond中 使用一个字典类型countis ={}统计单词出现的次数 可采用以下代码

2020-10-12 03:22:52 网课题库 阅读

问题详情

设将单词保存在变量wond中,使用一个字典类型countis ={}统计单词出现的次数, 可采用以下代码

A.counts[ word] = count[word] + |

B.counts[ word] = 1

C.counts[ word] = count.get(word,0) + 1

D.counts[ word」= count.get(word,1) + 1

参考答案

counts[word] = counts.get(word,0) + 1

考点:单词,变量,可采用
Copyright © 2018-2024 问答库 保留所有权利.   SiteMap  .