title: how to delete a message in tkinter after click
body: <p>I'm trying to delete a message from tkinter. can you help me with it??    </p>
  
  <pre><code>Label(root,text="Password : ").place(x=X+0,y=Y+170,in_=root)          #password to registor
  reg_password=StringVar()
  e5 = Entry(root,textvariable=reg_password).place(x=X+65,y=Y+170,in_=root)
  
  m=Message(root,text='',fg="red").place(x=X+0,y=Y+250,in_=root)    
  def sign_up():
      global m
      regpass = "^[A-Z][\w(!@#$%^&amp;*_+?)+]{8,}$"
      if not (re.search(regpass,reg_password.get())):
          m.config(text='''-&gt;Spaces and empty sets are not allowed.
          \n -&gt;First character should be a captial letter.
          \n -&gt;Password must be greater than 8 character and must contain a special character.''')
      else:
          pass
  </code></pre>
  
  <p>if for the first time if password entered is wrong it will print the message and in the second time if the password is correct the message will be deleted</p>
  
  <p>but it shows the error</p>
  
  <pre><code>AttributeError: 'NoneType' object has no attribute 'config'
  </code></pre>