题库首页 › GESP等级认证(Python) › 题目 20635

下面Python代码的作用是统计字符串 s 中每个字符出现的次数。s = "abacab" dict_count = {} for char in s: dict_count[char] = dict_count.get(char) + 1 print(dict_count)

A. 正确
B. 错误

正确答案:错误

试卷来源:202512 CCF-GESP编程能力等级认证Python三级真题

本卷相关题目

在线做题 同科目题库