Unsure about what's wrong here


#1

Unsure what exactly is wrong with my code

it seems to not properly check for the "fizz" in the generated sentences

A day at the supermarket : Lists + functions

 def fizz_count(x):
    count=0
    for item in x:
        if item=="fizz":
            count+=1
        return count


#2

i think you should return the count after the loop ends , because if we return something that mean the end of the function


#3

In other words,

    for item in x:
        if item=="fizz":
            count+=1
    return count

#4

hey thanks ! it was an indentation issue you're right !