Python easy to read and understand | DFS
```\n# Definition for a binary tree node.\n# class TreeNode:\n#     def init(self, val=0, left=None, right=None):\n#         self.val = val\n#         self.left
```\n# Definition for a binary tree node.\n# class TreeNode:\n#     def __init__(self, val=0, left=None, right=None):\n#         self.val = val\n#         self.left = left\n#         self.right = right\nclass Solution:\n    def dfs(self, node, to_delete):\n        if not node:\n            return None\n        node.left, node.right = self.dfs(node.left, to_delete), self.dfs(node.right, to_delete)\n        if node.val in to_delete:\n            if node.left:\n                self.ans.append(node.left)\n            if node.right:\n                self.ans.append(node.right)\n            return None\n        else:\n            return node\n        \n    def delNodes(self, root: Optional[TreeNode], to_delete: List[int]) -> List[TreeNode]:\n        self.ans = []\n        node = self.dfs(root, to_delete)\n        if node:\n            self.ans.append(node)\n        return self.ans
['Depth-First Search', 'Python', 'Python3']