<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>
Write a function that counts how many times the string “fizz” appears in a list.
Write a function called fizz_count that takes a list x as input.
Create a variable count to hold the ongoing count. Initialize it to zero.
for each item in x:, if that item is equal to the string “fizz” then increment the count variable.
After the loop, please return the count variable.
For example, fizz_count([“fizz”,“cat”,“fizz”]) should return 2.
Returning 0 instead of 1
<What do you expect to happen instead?>
Should be returning 1 not 0. return is outside of the for loop
def fizz_count(x):# Write your function below! count = 0 for item in x: if x == 'fizz': count = count + 1 return count