anytree
anytree copied to clipboard
Delete or remove a node
I'm not sure if I missed it in the Doc or not. But I'd like to be able to delete a node.
Nodes are removed from the tree by setting the parent to None. This will not delete the node but make it the root so afterwards you have two trees. See in the docs.