pre-order traversal and prefix notation prefix notation is commonly referred to as polish notation herethe operator comes before its operandsas in since there is no ambiguity of precedenceparentheses are not required to traverse tree in pre-order modeyou would visit the nodethe left sub-treeand the right sub-tree nodein that order prefix notation is well known to lisp programmers the recursive function for this traversal is as followsdef preorder(selfroot_node)current root_node if current is nonereturn print(current dataself preorder(current left_childself preorder(current right_childnote the order in which the recursive call is made post-order traversal and postfix notation postfix or reverse polish notation (rpnplaces the operator after its operandsas in as is the case with polish notationthere is never any confusion over the precedence of operatorsso parentheses are never needed in this mode of traversalyou would visit the left sub-treethe right sub-treeand lastly the root node the post-order method is as followsdef postorder(selfroot_node)current root_node if current is nonereturn self postorder(current left_childself postorder(current right_childprint(current data