• Precondition not needed?

Question related to mission Non-unique Elements

Hello, My first code was: def checkio(data): if len(data) >0 and len(data) <1000: new_list = [] a=0 for element in data: if data.count(element) != 1: new_list.append(element) a += 1 return new_list else: exit It worked but didn't let me pass this task. Then I tried this: def checkio(data): lst=[] for item in data: if data.count(item)>1: lst.append(item) return lst

I passed. I don't understand then - why you mention Precondition and the task may be passed without writing the precondition code? I have to admit: this is confusing. Thank you for Your kind answer in advance.