第26691题 单选
有关下列Python的count_if函数代码,说法错误的是?
def count_if(iterData,*,key=None):
    if key == None:
        return len(iterData)

    Count = 0
    for i in iterData:
        Count += bool(key(i))
    return Count
A

执行 print(count_if(range(100))) 将输出 100

B

执行 print(count_if(range(-10,10), key = abs)) 将输出 19

C

执行 print(count_if(range(-100,10),key = lambda x:x > 5)) 将输出 4

D

代码 Count += bool(key(i)) 存在错误