Removing all duplicated pairs in a Python list
I think you should try re-making __removepairs_once__ only using results.
No most_recent_element.

So, you would want to retry you algorithm, most_recent_element can be results[-1].
Using this you should come to this stub code:

def _remove_pairs(list_):
    result = []
    for item in list:
        if item == results[-1]:
            # remove last item
            # don't add this item
        else:
            # add this item
    return result


Using this you should notice that it'll error if results is empty, this means you should use the else if it is.
The if block is surprisingly simple, it's results.pop(). And the else is results.append(item).

def _remove_pairs(list_):
    results = []
    for item in list_:
        if results and item == results[-1]:
            results.pop()
        else:
            results.append(item)
    return results


A quick test of this actually (unsurprisingly) returns the final list that you wanted.



Don't use __{}__ for anything! Only use it for pythons magic functions!

You should also not use list but list_ as then you can still convert something to a list.