I'm struggling with the Purify exercise. I'm not sure if this is even a decent way of doing this, but this is what I have so far:
def remove_duplicates(x): new_list =  for items in x: while x.count(items) >1: new_list.append(items) return new_list
It gives me the following error: Oops, try again. remove_duplicates([4,5,5,4]) resulted in an error:
And that's it. It's not specifying the error. Any help would be appreciated!