• Non-unique

 

Can anyone explain why this:

def checkio(data): for x in data: if(data.count(x)==1): data.remove(x) return data

return [2,4] for [1,2,3,4,5] input data? I'm confused...

.