comefrom: <doocs>0682.Baseball Game_1.py
code: def calPoints( ops: List[str]) -> int:
      stk = []
      for op in ops:
          if op == '+':
              stk.append(stk[-1] + stk[-2])
          elif op == 'D':
              stk.append(stk[-1] << 1)
          elif op == 'C':
              stk.pop()
          else:
              stk.append(int(op))
      return sum(stk)
masked: def sample_funcname ( var_0 : List [ str ] ) -> int :
      var_4 = [ ]
      for var_5 in var_0 :
          if var_5 == '+' :
              var_4.append ( var_4 [ - 1 ] + var_4 [ - 2 ] )
          elif var_5 == 'D' :
              var_4.append ( var_4 [ - 1 ] << 1 )
          elif var_5 == 'C' :
              var_4.pop ( )
          else :
              var_4.append ( int ( var_5 ) )
      return sum ( var_4 )
  