title: Call a function after pressing a button (tkinter)
body: <p>I created a button &quot;button&quot; and I want to call a function &quot;function&quot; when I press on this button.
  When I run the program, the function is called and then the button appears. If I press it once again, the function is not called. So how to disable calling the function without pressing the button and how to enable calling the function at each press on the butotn?</p>
  <pre><code>
  from tkinter import *
  
  def function():
     what this function does
  
  root = Tk()
  button = Button(root,text=&quot;Call function&quot;, command=function())
  button.pack()
  root.mainloop()
  </code></pre>