My code is either skipping the first if statement or the second for loop. Either way, it won't append anything into edit so the program continues to return .
"Oops, try again. remove_duplicates([4, 5, 5, 4]) returned  instead of [4, 5]"
def remove_duplicates(lst): edit =  for n in lst: if lst.count(n) > 1: for i in edit: if n != i: edit.append(n) else: edit.append(n) return edit remove_duplicates([4,5,5,4])