edited else-if to elif

This commit is contained in:
Shaurya Bisht 2024-10-14 18:12:01 +00:00
parent fb53ab85f6
commit 240acd1448

View File

@ -220,8 +220,7 @@ def del_node(root: MyNode, data: Any) -> MyNode | None:
return root return root
else: else:
root.set_left(del_node(left_child, data)) root.set_left(del_node(left_child, data))
else: elif right_child is None:
if right_child is None:
print(f"No such data ({data}) exists in the right subtree.") print(f"No such data ({data}) exists in the right subtree.")
return root return root
else: else: