title: How do I reassign Label text with Tkinter from a different function
body: <pre><code>from tkinter import *
  
  
  
  
  # reassigns variables for label and button texts
  def Ctrack(vname, vvalue):
      #global vname
      vname = vvalue
      
      #place holder to check which button has been clicked
      print(vname)
      
      #labeltext = reassign label text bas
      
      
  # creates labels and buttons
  def buttons():
      root = Tk()
      
      #first label
      
      winlabel = Label(root, text =labeltext )
      winlabel.grid(row = 0, column = 1, padx = 10, pady = 10)
      
      #first button
      but1 = Button(root, text = &quot;button 1&quot;, command = lambda *args: Ctrack(0, 1))
      but1.grid(row = 0, column = 2, padx = 10, pady = 10)
      
      #second button
      but2 = Button(root, text = &quot;button 2&quot;, command = lambda *args: Ctrack(0, 2))
      but2.grid(row = 0, column = 3, padx = 10, pady = 10)
      
      root.mainloop()
  
  buttons()
  </code></pre>
  <p>(first time using Stackoverflow)</p>
  <p>How do I reassign the label text in my buttons function to whatever I assign the variable in the Ctrack function?</p>