Append a node to the end of the list of children of this node. :param data: The data to append as a child of this node. This data will be converted into a Node object. :param children: The data for the children of the new child node. :returns: The new added child
(self, data: object, children: object = None)
| 137 | return node |
| 138 | |
| 139 | def append(self, data: object, children: object = None) -> Node[T]: |
| 140 | """Append a node to the end of the list of children of this node. |
| 141 | |
| 142 | :param data: The data to append as a child of this node. This data will be |
| 143 | converted into a Node object. |
| 144 | :param children: The data for the children of the new child node. |
| 145 | :returns: The new added child Node object. |
| 146 | """ |
| 147 | return self.insert(len(self), data=data, children=children) |
| 148 | |
| 149 | def remove(self, child: Node[T]) -> None: |
| 150 | """Remove a child node from this node. |