Evaluate a postfix expression
In postfix notation the operator comes after its two operands: 3 4 +
means 3 + 4, and 3 4 + 2 * means (3 + 4) * 2. It can be evaluated with
a stack in one pass: read the tokens left to right; push every number;
when you meet an operator, pop two numbers, apply the operator with the
first-popped as the right-hand operand, and push the result. At the end
the stack holds exactly one number, the answer.
Write evaluate(expression) for a space-separated expression using
integers and the operators +, -, *. The expression is always valid.
evaluate("3 4 +") -> 7
evaluate("3 4 + 2 *") -> 14
evaluate("10 2 3 * -") -> 4
def evaluate(expression):
...