Oops, try again. Your remove_duplicates modifies the list that was passed to it. [4, 5, 5, 4] was modified to [4, 5]. Perhaps you should make a copy first!
I don; t get why i receive this problem - the code works, we take an input list, copy it, modify our COPY, then return the new version, so i don't understand why i receive that message ?
def remove_duplicates(lst): lst2=lst for i in range(0,len(lst2)): for q in range (i+1,len(lst2)): if lst2[i]==lst2[q]: lst2.pop(q) return lst2