<Below this line, add a link to the EXACT exercise that you are stuck at.>
<In what way does your code behave incorrectly? Include ALL error messages.>
Traceback (most recent call last):
File “python”, line 11, in
File “python”, line 6, in purify
IndexError: list assignment index out of range
<What do you expect to happen instead?>
Display an even list
Replace this line with your code.
def purify(sequence): even_list =  count = 0 for i in sequence: if (i%2 == 0): even_list[count] = i if(count <= len(sequence)-1): count += 1 return even_list print purify()
I am trying to write my own function here. Don't know what improvements are required here?