Replace this line with your code. 

def fizz_count(lost):
    for i in lost:
        if i=='fizz':
    return count


i ma not able to print exact how many times fizz appears.


what is your question? what is the error you get?


i want to print how many times the string fizz is repeated in the the list.
its showing the count value should be 4


you store the result of the counting in small variable, so print small on the last line


its printing 1.every time.


did you add print small as last line of code? it should print 2, given fizz is twice in your list


yaa.again its showing 1.


oops, i missed that.

we can update a variable like this:

a = 5
a = a  + 5

we can also use a shorthand:

a = 5
a += 5

you use the shorthand, but incorrectly. you have =+, while it should be +=


thanks bro.i got it.


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