title: How can I get the button id when it is clicked?
body: <p>I don't get how to reference the button being clicked in tkinter. </p>
  
  <p>My code: </p>
  
  <pre><code>for file in files: 
       btn = Button(root, text=file).pack()
  </code></pre>
  
  <p>Now e.g. 50 buttons are generated from files which is the source.<br>
  However when I click any button, only the LAST button is being referenced, but not the button I really want to use/click.</p>
  
  <p>In JavaScript we use <code>this</code> to reference the object we really clicked, however I couldn't find any solution in Python for this.</p>