What is wrong with the code!
My code :
def count(squence, item): total = 0 for x in squence: print x if x == item: total = total + 1 return int(total)
Oops, try again. Your function fails on count([4, 'foo', 5, 'foo'],5). It returns 0 when it should return 1.