data type of button tkinter code example
Example: give utton a number python
def create_buttons(self):
for x in range(10):
button = ttk.Button(self, text=x, command=lambda number=x: self.callback(number))
button.grid()
def create_buttons(self):
for x in range(10):
button = ttk.Button(self, text=x, command=lambda number=x: self.callback(number))
button.grid()