4. List + Functions (Help!)



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

Hello, please help me, am going crazy with this. The code should work correctly, I've been through the other Q&A and most got it wrong in the indentation but I've checked this repeatedly. Am not sure what am doing wrong, tried adding an example but is also wrong, the function somwhow is not working

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


Did you mean, if item == 'fizz'?


Yes!!! Couldn't see it jaja. Many thanks!