title: Python: Remove a button on click and restore in another click?
body: <p>I wrote a gui program using Tkinter.</p>
  
  <pre><code> from Tkinter import *     
  
  class Test(object):
      def __init__(self):
          self.root=Tk()
          self.root.resizable(0,0)
          self.lframe = Frame(self.root,width=300,height=200,bg="White",padx=0)
          self.lframe.pack()
          self.startG()
      def startG(self):    
          self.l1 = Label(self.lframe,text="Card Number",width=15,height=2);
          self.l1.grid(row=0,column=0,padx=10,pady=20)
          self.login = Button(self.lframe,text="Login", fg="black",height=2,width=20,command = self.login)
          self.login.grid(row=0,column=1,padx=10,pady=50)
  
      def login(self):
              self.l1.destroy()
              self.login.destroy()
              self.l2 = Label(self.lframe,text="User ID  : ",height=2)
              self.l2.grid(row=0,columnspan=2,pady=10,padx=10)
              self.logout = Button(self.lframe, text="Logout !", fg="black",height=2,width=15,command = self.logout)
              self.logout.grid(row=0,column=2,pady=10,padx=10); 
      def logout(self):
          self.l2.destroy()
          self.logout.destroy()
          self.startG()              
  
  if __name__ == "__main__":
      t  = Test()
      mainloop() 
  </code></pre>
  
  <p>Above code snippet shows initial gui as <br/><img src="https://i.stack.imgur.com/2Xqli.png" alt="Final"><br/>
  After clicking on login it changes to <br/><img src="https://i.stack.imgur.com/R7gNx.png" alt="Initial"><br/>
  After clicking on logout GUI restore to initial GUI <br/> <img src="https://i.stack.imgur.com/2Xqli.png" alt="Final"><br/>
  <strong>Now login button is no more working .</strong> </p>
  
  <p>How to resolve this error ? </p>