I do not understand what is wrong


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

fizz_count(["fizz", "cat", "fizz"])


Try: count = 0 +1.
That should work.


I got, it was actually the return count not indented properly.


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