from tkinter import * from tkinter import ttk def click(row, col): if game_run and pole[row][col]['text'] == ' ': pole[row][col]['text'] = 'X' pole root = Tk() root.title("Hihihanki-hahanki") root.geometry("350x400") game_run = True pole = [] for r in range(3): for c in range(3): button = ttk.Button() button.grid(row=r, column=c, ipadx=6, ipady=6, padx=6, pady=70) root.mainloop()