I get this error message while I'm running my code:
Oops, try again.
Your remove_duplicates modifies the list that was passed to it. [4,
5, 5, 4] was modified to [4, 4, 5, 5]. Perhaps you should make a copy
But I'd tested that in both idle 3.5 and idle 2.7 python shells. It works fine. The output is:
Maybe it's a bug in code validation procedure?
def remove_duplicates(glist): uniqs =  prev = None sorted_glist = glist sorted_glist.sort() for curr in sorted_glist: #print(prev) #print(curr) if curr != prev: uniqs.append(curr) prev = curr return uniqs print(remove_duplicates([4, 5, 5, 4]))