Lists + Functions


#1

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!!!!!!!!!


#2

here:

if item = 'fizz':

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


#3

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


#4