3、使用字典统计字符串中每个字符出现的次数,横线上应该填写的代码是
- dic = {}
- for c in 'an apple a day keeps the doctor away':
- dic[c] = __________
- print(dic)
A、dic[c]+1
B、dic.get(c)+1
C、dic.get(c,1)
D、dic.get(c,0)+1
3、使用字典统计字符串中每个字符出现的次数,横线上应该填写的代码是
- dic = {}
- for c in 'an apple a day keeps the doctor away':
- dic[c] = __________
- print(dic)
A、dic[c]+1
B、dic.get(c)+1
C、dic.get(c,1)
D、dic.get(c,0)+1
Scratch3.0 全国青少年软件编程等级考试 Python Scratch图形化一级 Scratch图形化四级 Scratch图形化三级 Scratch图形化二级 电子学会