Lists + Functions: fizz_count(["fizz", "buzz"]) returned 0 instead of the correct answer: 1


#1



Hello,

In my attempt to determine the cause of the error I have tried different code options (now marked as comments) but I can't seem to be able to resolve it.

In advance, thank you for your help

https://www.codecademy.com/courses/python-beginner-en-IZ9Ra/0/4?curriculum_id=4f89dab3d788890003000096#


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

#random_list = ["fizz", "buzz"]
#total = fizz_count(random_list)
#print total

#print fizz_count(["fizz", "buzz"])

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


#2

here:

if x == "fizz":

tell me, what is x?


#3

OMG why is it always the silliest mistakes the hardest to spot, thank you very much.

that line should actually be if item == "fizz":


#4