Lists + Functions


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

For some reason it is returning error in line 4, Please help me!!!!!!!!!



if item = 'fizz':

a single equal sign mean assign, you want to check if item equals fizz, not assign fizz to item


Ohk, got it. Thank you for explaining it!!!!!! :))))))))))))