• i dont know why this code is not working...

Question related to mission Non-unique Elements

 

This below code outputs [2,4]. I expected just only nothing like []. Please tell me why this code does not work....

Thank you.

data = [1, 2, 3, 4, 5] def checkio(data): answer = data for x in data: count = data.count(x) if count == 1: answer.remove(x)

return answer