elseself data data findval method to compare the value with nodes def findval(selflkpval)if lkpval self dataif self left is nonereturn str(lkpval)+not foundreturn self left findval(lkpvalelif lkpval self dataif self right is nonereturn str(lkpval)+not foundreturn self right findval(lkpvalelseprint(str(self datais found'print the tree def printtree(self)if self leftself left printtree(printself data)if self rightself right printtree(root node( root insert( root insert( root insert( print(root findval( )print(root findval( )when the above code is executedit produces the following result not found is found