def evaluate_postfix(expression):
    """
    Evaluates a postfix expression using a shift/stack
    """
    def plus(x, y):
        return x+y

    def minus(x, y):
        return x - y

    def multiply(x, y):
        return x*y

    def div(x, y):
        return x / y

    operators = {'+': plus,
                 '/': div,
                 '-': minus,
                 '*': multiply}

    stack = list()
    for char_ in expression:
        if char_ not in operators:
            stack.append(int(char_))
        else:
            left = stack.pop()
            right = stack.pop()
            res = operators[char_](left, right)
            stack.append(res)

    return stack[0]