class Solution:

# @param tokens, a list of string

# @return an integer

def evalRPN(self, tokens):

operator={"+":(lambda x,y : x+y), "-":(lambda x,y : x-y), "*":(lambda x,y : x*y), "/": (lambda x,y: x/y)}

a=[]

for e in tokens:

if e not in operator.keys():

a.append(float(e))

if e in operator.keys():

result=operatore

a.pop()

a.pop()

a.append(result)

return int(a[0])

can not pass the test

Input: ["10","6","9","3","+","-11","*","/","*","17","+","5","+"]

Output: 21

Expected: 22

if I change to return int(round(a[0]))

it can not pass the test

Input: ["4","13","5","/","+"]

Output: 7

Expected: 6

any one can help me have a look at it?

I think the test criteria is awkward.