How to retrieve the row and column information of a button and use this to alter its settings in python
问题 I am creating a game and trying to make it in python and tkinter. I have already completed it in word-based python and want to make it graphical. I have created a grid of buttons to be used as a grid and these buttons currently have the letter "O" on them to show an empty space. However, what I would like is the button to show text of where a pirate is and then eventually the player and chests. The text cannot be hard coded as the positions are randomly selected. while len(treasure)