title: Tic-tac-toe using python tkinter
body: <p>Tic-tac-toe game using python tkinter is not working correctly.<br>
  Tic-tac-toe structure is correct. I just want to change the click event. <br>
  Only button9 output shown when click to any button</p>
  
  <p>Every time I click any button this output is shown</p>
  
  <p><img src="https://i.stack.imgur.com/dxWrk.png" alt=""></p>
  
  <pre><code>from tkinter import *
  
      bclick = True
  
  
      tk = Tk()
      tk.title("Tic Tac toe")
      tk.geometry("300x400")
      n = 9
      btns = []
  
  
      def ttt(button):
          global bclick
          print(button)
          if button["text"] == "" and bclick == True:
              print("if")
              button.config(text="X")
              bclick = False
          elif button["text"] == "" and bclick == False:
              print("else")
              button["text"] = "0"
              bclick = True
  
  
      for i in range(9):
          btns.append(Button(font=('Times 20 bold'), bg='white', fg='black', height=2, width=4))
      row = 1
      column = 0
      index = 1
      print(btns)
      buttons = StringVar()
      for i in btns:
  
          i.grid(row=row, column=column)
          i.config(command=lambda: ttt(i))
          print(i, i["command"])
          column += 1
          if index % 3 == 0:
              row += 1
              column = 0
          index += 1
      tk.mainloop()
  </code></pre>