title: Tkinter buttons calling functions without pressing them
body: <p>I've had this problem for a while. When I start a program, any tkinter buttons will call their functions without being pressed or anything. and after that, I cannot use the button anymore because it only works once for some reason. Can anybody help?</p>
  <p><strong>This is not the actual code, but it is an example:</strong></p>
  <pre><code>from tkinter import *
  
  root = Tk()
  
  def function():
      print(&quot;activated&quot;)
  
  button = Button(root, text=&quot;this is a button&quot;, command=function)
  button.pack()
  
  root.mainloop()
  </code></pre>