Light Mode
Dark Mode
i dont know why this code is not working...

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

Created: April 6, 2021, 7:31 p.m.
Updated: April 7, 2021, 6:34 a.m.
2
9
User avatar
Crazy-Koteen