title: Python: Button to reset a label to zero
body: <p>I am trying to do a count of a price sum, but I am having trouble getting my reset function to make the total price go back to $0. The actual variable that holds the value resets to zero. I just need to reset the label. tkinter is being used. </p>
  
  <pre><code>from tkinter import *
  root = Tk()
  root.title("QTouch 10")
  global total, count
  total = 0
  count = StringVar()
  </code></pre>
  
  <p>--List of things I used not involved--</p>
  
  <pre><code>amount = Label(root, textvariable=count)
  count.set("$--") 
  
  def res():
      total = 0
      **count.set("$--")**
      for n in names:
          names[names.index(n)][3] = 0
      label = Label(root, text="0").grid(row=names.index(n)+1, column=4)  
  
  
  amount.grid(row=10, column=4)
  
  reset = Button(root, text="Reset", command=lambda *args: res()).grid(row=10, 
  column=1)
  </code></pre>