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 first!
I expect the function to print the singles list and not just modify the input. When I couldn't figure out why I wasnt getting the right answer I tested it using my own list as you can see below and it print a list of [4,5]
def remove_duplicates(integers): singles =  duplicates =  new = integers new.sort() singles.append(new[len(new) - 1]) for i in range(0, len(new) - 1): if new[i] == new[i + 1]: duplicates.append(new[i]) else: singles.append(new[i]) return singles lists = [4,5,5,4] print remove_duplicates(lists)