Evaluate an infix token list with exponents
Your task
Evaluate an expression given as a list of tokens, where each token is either an integer (as a Python int) or one of the operator strings '+','-','','/','^'. '^' is exponentiation and is RIGHT-associative; '','/' are left-associative with precedence above '+','-'; '^' has the highest precedence. Division is integer division truncating toward zero and operands are positive enough that exponents are small (0..6). Use the shunting-yard algorithm. The token list is a valid infix expression with no parentheses. Return the integer result.
Examples
eval_infix(tokens: list) -> intExample 1
Input
eval_infix([2, "+", 3, "*", 4])Output
14