I got a working solution (I feel), but the test is giving me the following error message:
Oops, try again. Your remove_duplicates modifies the list that was passed to it. [4, 5, 5, 4] was modified to . Perhaps you should make a copy first!
I don't feel this is what I am doing, I am copying the original list in a new list I call 'result'.
If I try the code with a list myself, the answer seems to be right.
Of course there is another way to do this but I thought of this way myself and now I would like to know if I am wrong or not. Could you guys help me out?
def remove_duplicates(list): result = list for x in result: test = x for y in result: if y == test: result.remove(y) return result print remove_duplicates([1,1,2,2])