title: How to clear the Entry widget after a button is pressed in Tkinter?
body: <p>I'm trying to clear the <code>Entry</code> widget after the user presses a button using Tkinter. </p>
  
  <p>I tried using <code>ent.delete(0, END)</code>, but I got an error saying that strings don't have the attribute <em>delete</em>.</p>
  
  <p>Here is my code, where I'm getting error on <code>real.delete(0, END)</code>:</p>
  
  <pre><code>secret = randrange(1,100)
  print(secret)
  def res(real, secret):
      if secret==eval(real):
          showinfo(message='that is right!')
      real.delete(0, END)
  
  def guess():
      ge = Tk()
      ge.title('guessing game')
  
      Label(ge, text="what is your guess:").pack(side=TOP)
  
      ent = Entry(ge)
      ent.pack(side=TOP)
  
      btn=Button(ge, text="Enter", command=lambda: res(ent.get(),secret))
      btn.pack(side=LEFT)
  
      ge.mainloop()
  </code></pre>