4. List + Functions


#1

def fizz_count(x):
    count=0
    for i in x:
        if i == "fizz" :
            count=count+1
    return count
        
x = ["fizz", "cat", "fizz"]
print fizz_count(x)

#2

do you have a question?


#3

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