Lists + Functions


#1



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


My code doesn't work, it returns 1 if fizz_count(['fizz', 'fIzZ', 8, 3, 'fizz', 'buzz', 8, 'fIzZ', 'fizz'])
but it should return 3
does anyone know what i did wrong?


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


#2

count = count =+ 1, are you sure this right? the shorthand is +=, but you already have count = count +, so not sure which approach you want.


#3

oops, that was the problem, thanks


#4