def checkio(data):
lst = data
for i in data:
if data.count(i) == 1:
lst.remove(i)
return lst
L = [2,4]
print checkio(L)
The result is [4]. Can anyone kindly tell me why this happens?
Thanks.
Created at: 2015/09/16 12:14; Updated at: 2015/09/16 18:10