执行给定的Python字符统计代码后,输出结果是否为1?
text = "i love china"
char_count = {}
for char in text:
if char != ' ':
char_count[char] = char_count.get(char, 0) + 1
print(char_count.get('i', 0))
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析