binary trees perfect tree down to height - slots on the lowest level filled from left to right figure examples of complete binary trees depend on its applicationwe are going to create and work with the trees directly instead of creating generic binary tree class trees are generally illustrated as abstract structures with the nodes represented as circles or boxes and the edges as lines or arrows to implement binary treehoweverwe must explicitly store in each node the links to the two children along with the data stored in that node we define the bintreenode storage classshown in listing for creating the nodes in binary tree like other storage classesthe tree node class is meant for internal use only figure illustrates the physical implementation of the sample binary tree from figure listing the binary tree node class the storage class for creating binary tree nodes class _bintreenode def __init__selfdata )self data data self left none self right none tree traversals the operations that can be performed on binary tree depend on the applicationespecially the construction of the tree in this sectionwe explore the tree traversal operationwhich is one of the most common operations performed on collections of data remembera traversal iterates through collectionone item at timein order to access or visit each item the actual operation performed when "visitingan item is application dependentbut it could involve something as simple as printing the data item or saving it to file with linear structure such as linked listthe traversal is rather easy since we can start with the first node and iterate through the nodesone at at timeby following the links between the nodes but how do we visit every node in binary treethere is no single path from the root to every other node in the tree rememberthe links between the nodes lead us down into the tree if we were to