title: Working on a way to return the text of a button after the button is clicked in tkinter
body: <p>I'm trying to create a list of buttons that are clicked with this lambda function:</p>
  
  <pre><code>button1.config(command=(lambda x: (clicked.append(x)))(button1.cget("text")))
  </code></pre>
  
  <p>It seems to sort of work but it prints the button text immediately i.e. it doesn't wait for user to click the button.  </p>
  
  <p>Any ideas on how to make it responsive to the button click?</p>
  
  <pre><code>class GraphicsInterface:
  
      def __init__(self):
          self.window = Tk()
          self.window.geometry("720x500")
  
          clicked=[]
          button1 = Button(self.window, text="Dice 1", width=13)
          button1.place(x=60, y=160)
  
          button1.config(command=(lambda x: (clicked.append(x)))(button1.cget("text")))
  
          print(clicked)
  </code></pre>