code: def destroy(self):
          
          # if this widget has a master remove the it from the master
          if self.master is not None:
              self.master._remove_child(self)
  
          self.tk.destroy()
docs: Destroy the tk widget.