Generator function for iterative inorder tree traversal
def morris_traversal ( root ) : NEW_LINE INDENT current = root NEW_LINE while current is not None : NEW_LINE INDENT if current . left is None : NEW_LINE INDENT yield current . data NEW_LINE current = current . right NEW_LINE DEDENT else : NEW_LINE DEDENT DEDENT