Firstly I followed this question, but I still have issues with the remove method.
tag.getparent().remove(tag)
I used this piece of code for removing anchor tag in question with attributes name="2" and id = "2" in this webpage
and when the line is executed I was still able to see the tag and its properties and when I iterate through all children I was still able to see the element which i deleted
What exactly does remove method does and why the tag which is deleted still persists?
This is the screenshot of the debugger after the line is executed.