12/15


#1

Hey! I have been having problem with my code, I'm not quite sure why it is incorrect!

Code:

def count(sequence, item):
    result = 0
    for x in sequence:
        if (x == item):
            result += 1
    return count

Any help would be great!


#2

Don't you mean to return 'result' instead of 'count' ?


#3

Whoops... Thank you! @codeninja84962


#4

here my version. Its doing good for me

def purify(x):
y = []
for char in x:
if char % 2 ==0:
y.append(char)
return y