title: How to stop an integer from resetting to its original value after each button press in tkinter
body: <p>I am making a program so that when the user presses any of the buttons the total_votes value increases by one. How do I make the total_votes value not reset back to 15 whenever I repress the button?</p>
  <pre><code>import tkinter as tk
  
  total_votes = 15
  
  root = tk.Tk()
  
  
  class VoteButton:
      def __init__(self, row, column, text):
          self.row = row
          self.column = column
          self.text = text
          self.vbtn = tk.Button(root, text=self.text, command=lambda: self.voting(total_votes))
  
      def draw(self):
          self.vbtn.grid(row=self.row, column=self.column)
  
      def voting(self, tv):
          tv += 1
          print(tv)
  
  
  btn = VoteButton(0, 0, &quot;button&quot;)
  btn.draw()
  
  btn2 = VoteButton(0, 1, &quot;button&quot;)
  btn2.draw()
  
  root.mainloop()
  </code></pre>