NumPy allowed · plain Python earns 10 bonus points
Implement an RPN (postfix) calculator with a stack -- the representation that needs no parentheses and no operator precedence rules at all, because the OPERAND ORDER already encodes evaluation order.
Implement eval_rpn(tokens): push every number onto a stack; on encountering an operator, pop the top two values (in the correct order: second-popped is the LEFT operand), apply the operator, and push the result back.
eval_rpn(tokens: list[str]) -> int