Postfix Expression Evaluator

Implement evaluate_postfix(tokens) using a stack, supporting +, - and * on integer operands.

Read a postfix expression as space-separated tokens on one line, and print the evaluated result.

main.py
Loading editor…

Console

Run your code to see output here.