Parameters: It accepts a parameter “A” which is a value going to be deleted from the weakset object.
Return Values: It returns true if the element has been removed successfully from the weakset object and false if the element has not been removed successfully or the element is not found in the weakset.
Here output is true at first it means that element “B” has been set into the weakSet object successfully and after it false which says that the element “B” has been deleted successfully from the weakSet object.
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.