input: 
  def evaluate(expression): 
      """
      This function evaluates a given postfix expression and returns the resulting value. 
      >>> evaluate("2 3 + 4 5 * *")
      46
      >>> evaluate("4 2 + 3 5 1 - * +")
      18
      """
      expression = expression.split() 
      stack = []  
      for element in expression: 
          if element.isdigit(): 
              stack.append(element) 
          else:  
              val1 = stack.pop() 
              val2 = stack.pop() 
              stack.append(str(eval(val2 + element + val1))) 
      return (int(stack[0])) 
  
output:     expression = expression.split() 
      stack = []  
      for element in expression: 
          if element.isdigit(): 
              stack.append(element) 
          else:  
              val1 = stack.pop() 
              val2 = stack.pop() 
              stack.append(str(eval(val2 + element + val1))) 
      return (int(stack[0]))