input: Write a function to evaluate a postfix expression. The input to the program should be a string with the postfix expression. The output should be the evaluated value of the expression.
  
  def evaluate(expression): 
    
      # split expression into list  
      expression = expression.split() 
    
      # stack to store integer values. 
      stack = []  
    
      # do for every element of expression. 
      for element in expression: 
    
          # If element is an operand push 
          # into stack it's a number only 
          if element.isdigit(): 
              stack.append(element) 
    
          # if element is an operator, 
          # pop two elements from stack 
          # perform respective operations 
          else:  
              val1 = stack.pop() 
              val2 = stack.pop() 
              stack.append(str(eval(val2 + element + val1))) 
    
      # return the value  
      return (int(stack[0])) 
    
  assert evaluate("2 3 + 4 5 * *") == 46
  assert evaluate("5 3 +") == 8
  assert evaluate("7 2 * 4 +") == 18
  assert evaluate("10 4 6 * 2 / +") == 22
  assert evaluate("100 20 /") == 5
output: def evaluate(expression): 
      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]))