So this code actually prints 3, which is should, but the program is still giving me this error:
Oops, try again. Does your count function take exactly two arguments: a list and an item to check against that list? Your code threw a "unsupported operand type(s) for +=: 'int' and 'str'" error.
Is this a Codecademy program issue or is my code actually off?
def count(sequence, item): found = 0 for i in sequence: if i == item: found += i return found print count([1,2,1,1],1)