Functions + Lists


So i've browsed soo many questions but still cant find an answer to my question.

Well when I input this code:

def fizz_count(x):
    for n in x:
        if count=='fizz':
    return count

It gives me this error message:

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

Please Help me fast



You want to know if n in **x*** is == 'fizz' and not count.

Hope this helps! :wink:


OMG thanks soo much i cant believe myself for being sooo stupid. You saved me alot of time.:heart:


You're welcome.

Have fun coding! :slight_smile:


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