title: Update a Label while the app is running without a button on Tkinter
body: <p>I want to make a label that keeps counting how many times the user typed a certain word(in this case &quot;1r#&quot;) in a ScrolledText without needing to make a button to update the label.
  Can I make a loop? If so, how could I do it?</p>
  <pre><code>from tkinter import *
  from tkinter import scrolledtext
  
  root = Tk()
  
  dataFrame = Frame(root)
  recFrame = Frame(root)
  
  dataLabel = Label(root, text=&quot;Dados&quot;).grid(column=0, row=0)
  dataInput = scrolledtext.ScrolledText(root, width=3, height=10)
  dataInput.grid(column=0, row=1)
  
  dataFrame.grid(column=0)
  
  # Counts how many times the text appears
  dataText = dataInput.get(&quot;1.0&quot;, &quot;end-1c&quot;)
  label = Label(recFrame, text=dataText)
  labelCount = label['text'].count(&quot;1r#&quot;)
  
  
  recPeTitle = Label(recFrame, text=&quot;P&quot;, width=3)
  recPeTitle.grid(column=0,row=1)
  
  # Here is where I want to &quot;print&quot; the count on a Label
  recPe1 = Label(recFrame, text=labelCount)
  recPe1.grid(column=0, row=2)
  
  recFrame.grid(column=1, row=1, sticky=NW)
  
  root.mainloop()
  </code></pre>
  <p>Every word the program will look for are three characters long, if it helps.</p>