I can't figure out why the code that I've written doesn't work.
It tells me that "Your function fails on count([4, 'foo', 'foo'],5). It returns 1 when it should return 0."
I tried to see if this was the case so I printed the result of count([4,'foo','foo'],5) and it seems to print 0 as it should.
def count(sequence, item): times = 0 while item in sequence: sequence.remove(item) times +=1 return times