def equals(stack):
    """
    Take the stack, pop off four items, if the two last items are equals
    append the first item to the stack, if they are unequal the second.
    """
    item_1 = stack.pop()
    item_2 = stack.pop()
    conditional_1 = stack.pop()
    conditional_2 = stack.pop()
    if conditional_1 == conditional_2:
        stack.append(item_1)
    else:
        stack.append(item_2)
