在本地输出结果是1,牛客网判定输出结果是2,咋回事?
计算字符个数
http://www.nowcoder.com/questionTerminal/a35ce98431874e3a820dbe4b2d0508b1
import collections
def f(s):
s = dict(collections.Counter(s))
if i in s:
count = s[i]
return count
s = "ABCaD"
i = "a"
print(f(s))