I'm not quite understanding the issue in this code. It returns the error message: "Oops, try again. Your function fails on count([4, 'foo', 5, 'foo'],5). It returns 0 when it should return 1."
Any help is appreciated.
This is the exercise for reference:
def count(sequence, item): found = 0 for item in sequence: if found == item: found += sequence[item] return count else: return 0