10. A day at the supermarket - Need help


Help please, can't do this right

# Write your function below!
def fizz_count(x):
    count = 0
    for item in x:
        if item == "fizz":
            count = count + 1
        return count

lis = ['pen','paint','paper','fizz','eraser','fizz','glue','fizz']
fizz = fizz_count(lis)
print fizz


Too much indentation. It should line up with the for.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.