第40771题 判断题
在对用户输入的标签进行次数统计时,可以使用如下的方法,把标签字符串 "python,java,python,c++,java" 转换成为字典{'python': 2, 'java': 2, 'c++': 1}。( )
tags = "python,java,python,c++,java"
result = {}
for tag in tags:
    result[tag] = result.get(tag, 0) + 1
print(result)
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
知识点:
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析