Oops, try again. Your function fails on purify([4, 5, 5, 4]). It returns [4, 5, 4] when it should return [4, 4].

ope is correct

def purify(number):
    for i in number: 
        if i % 2 != 0:
    return number


The .remove() only removes the first item. For this lesson, you will be better to make an empty list, then append to that list any even number.



please i dnt get u well


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.