from collections import deque
class Solution:
    # @param A : list of strings
    # @return an integer
    def evalRPN(self, A):
        
        stack = deque()
        for i in A:
            if i not in ["+","-","*","/"]:
                stack.append(i)
            else:
                val1 = stack.pop()
                val2 = stack.pop()
                sol = str(int(eval(val2 + i + val1)))
                stack.append(sol)
        return stack.pop()

36ef93b8902b0e7b0ffe19ce5fa93104ad72f6df
<mask token>

<mask token>


class Solution:
    <mask token>

<mask token>


class Solution:

    def evalRPN(self, A):
        stack = deque()
        for i in A:
            if i not in ['+', '-', '*', '/']:
                stack.append(i)
            else:
                val1 = stack.pop()
                val2 = stack.pop()
                sol = str(int(eval(val2 + i + val1)))
                stack.append(sol)
        return stack.pop()

from collections import deque


class Solution:

    def evalRPN(self, A):
        stack = deque()
        for i in A:
            if i not in ['+', '-', '*', '/']:
                stack.append(i)
            else:
                val1 = stack.pop()
                val2 = stack.pop()
                sol = str(int(eval(val2 + i + val1)))
                stack.append(sol)
        return stack.pop()

from collections import deque
class Solution:
    # @param A : list of strings
    # @return an integer
    def evalRPN(self, A):
        
        stack = deque()
        for i in A:
            if i not in ["+","-","*","/"]:
                stack.append(i)
            else:
                val1 = stack.pop()
                val2 = stack.pop()
                sol = str(int(eval(val2 + i + val1)))
                stack.append(sol)
        return stack.pop()
