It won't count the fizz right


i feel dumb but i don't know were the put the fizzs so that the function will count it because I've tried everywhere (i think) because i always get the same error

Oops, try again. fizz_count(['fizz', 'buzz']) returned 0 instead of the correct answer: 1

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


In line 4, change it from

if x == 'fizz': to if item == 'fizz':

and it should work properly. Hope this helps :slight_smile:


it worked thanks now i can just look at my code and understand it