Fizz count


#1

Why doesn't this code return a number of fizzes?

def fizz_count(x):
    total = 0
    for item in x:
        if item == "fizz":
            total = total + 1
    return total
    
fizz_count(["fizz", 'fizz', 'cat', 'fizz'])


#2

your code work !!
you just should print the result( total number of fizz) by
print fizz_count(["fizz", 'fizz', 'cat', 'fizz'])


#3

It does, if you want to print them to console you need to put print before calling function