I don't understand this error: "Your remove_duplicates modifies the list that was passed to it. [4, 5, 5, 4] was modified to [5, 4]. Perhaps you should make a copy first!"
I did make a copy and I'm returning the new_list, not the original. So not sure why I'm getting that error.
def remove_duplicates(dup_list): new_list =  for e in dup_list: dup_list.count(e) if 1 <= dup_list.count(e) > 1: dup_list.remove(e) for e in dup_list: new_list.append(e) return new_list