importwxclassExample(wx.Frame):def__init__(self,*args,**kwargs):super(Example,self).__init__(*args,**kwargs)self.InitUI()defInitUI(self):self.locale=wx.Locale(wx.LANGUAGE_ENGLISH)# create parent panelself.pnl=wx.Panel(self)# create a button at point (20, 50)self.btn1=wx.Button(self.pnl,id=1,label="Remove Text",pos=(20,50))# create button to destroyself.btn0=wx.Button(self.pnl,id=1,label="Click button to remove",pos=(20,20))# bind Onclick() function with buttonself.btn1.Bind(wx.EVT_BUTTON,self.Onclick)self.SetSize((350,250))self.SetTitle('wx.Button')self.Centre()defOnclick(self,e):# destroy btn0 buttonself.btn0.Destroy()defmain():app=wx.App()ex=Example(None)ex.Show()app.MainLoop()if__name__=='__main__':main()