<garvit244>150_1.py
def evalRPN( tokens):
    if not tokens:
        return 0
    
    stack = []
    for val in tokens:
        if val == '+':
            val1 = stack.pop()
            val2 = stack.pop()
            stack.append(val1 + val2)
        elif val == '-':
            val1  = stack.pop()
            val2 = stack.pop()
            stack.append(val2-val1)
        elif val == '*':
            val1  = stack.pop()
            val2  = stack.pop()
            stack.append(val2*val1)
        elif val == '/':
            val1 = stack.pop()
            val2  = stack.pop()
            if val1*val2 < 0:
                stack.append(-(-val2/val1))
            else:
                stack.append(val2/val1)
        else:
            stack.append(int(val))
    return stack[0]
def sample_funcname ( var_0 ) :
    if not var_0 :
        return 0
    var_2 = [ ]
    for var_3 in var_0 :
        if var_3 == '+' :
            var_6 = var_2.pop ( )
            var_7 = var_2.pop ( )
            var_2.append ( var_6 + var_7 )
        elif var_3 == '-' :
            var_6 = var_2.pop ( )
            var_7 = var_2.pop ( )
            var_2.append ( var_7 - var_6 )
        elif var_3 == '*' :
            var_6 = var_2.pop ( )
            var_7 = var_2.pop ( )
            var_2.append ( var_7 * var_6 )
        elif var_3 == '/' :
            var_6 = var_2.pop ( )
            var_7 = var_2.pop ( )
            if var_6 * var_7 < 0 :
                var_2.append ( - ( - var_7 / var_6 ) )
            else :
                var_2.append ( var_7 / var_6 )
        else :
            var_2.append ( int ( var_3 ) )
    return var_2 [ 0 ]
