#4 Lists and Functions


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>

<What do you expect to happen instead?>

My code: ```python

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

result = fizz_count([“fizz”,“cat”, “fizz”])
print result


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

I have no idea what's wrong... have looked through the forums and can't figure it out.
Thanks for your help!
<do not remove the three backticks above>

#2

the problem is in this line:

count + 1

this doesn’t update your variable. To update your variable, re-assign it:

count = count + 1

this will update count (the current number in count + 1

You can shorten this line, but i will leave that to you


#3

Oh gosh that is incredibly obvious!!
Thank you for the help!