figure sack contents during evaluationfigure more complex example of evaluationfigure shows slightly more complex example + +there are two things to note in this example firstthe stack size growsshrinksand then grows again as the subexpressions are evaluated secondthe division operation needs to be handled carefully recall that the operands in the postfix expression are in their original order since postfix changes only the placement of operators when the operands for the division are popped from the stackthey are reversed since division is not commutative operatorin other words / is not the same as / we must be sure that the order of the operands is not switched assume the postfix expression is string of tokens delimited by spaces the operators are */+and -and the operands are assumed to be single-digit integer values the output will be an integer result create an empty stack called operand_stack convert the string to list by using the string method split scan the token list from left to right if the token is an operandconvert it from string to an integer and push the value onto the operand_stack if the token is an operator*/+or -it will need two operands pop the operand_stack twice the first pop is the second operand and the second pop is the first operand perform the arithmetic operation push the result back on the operand_stack basic data structures