input: 
  def evaluate(expression: str) -> int:
      """Evaluate a given postfix expression. The input to the program should be a 
      string with a space-separated postfix expression. The output should be 
      the evaluated value of the expression.
      
      >>> evaluate("2 3 + 4 5 * *")
      46
      >>> evaluate("3 4 5 * +")
      23
      """
      # split expression into list  
      tokens = expression.split()
  
      # stack to store integer values. 
      stack = []
  
      # process each token in the expression. 
      for token in tokens:
          if token.isdigit():
              stack.append(int(token))
          else:
              val1 = stack.pop()
              val2 = stack.pop()
              if token == '+':
                  stack.append(val2 + val1)
              elif token == '-':
                  stack.append(val2 - val1)
              elif token == '*':
                  stack.append(val2 * val1)
              elif token == '/':
                  stack.append(val2 // val1)  # using integer division
  
      # return the final result. 
      return stack[0]
  
output:     # split expression into list  
      tokens = expression.split()
  
      # stack to store integer values. 
      stack = []
  
      # process each token in the expression. 
      for token in tokens:
          if token.isdigit():
              stack.append(int(token))
          else:
              val1 = stack.pop()
              val2 = stack.pop()
              if token == '+':
                  stack.append(val2 + val1)
              elif token == '-':
                  stack.append(val2 - val1)
              elif token == '*':
                  stack.append(val2 * val1)
              elif token == '/':
                  stack.append(val2 // val1)  # using integer division
  
      # return the final result. 
      return stack[0]