I'm new to python GUI and I'm writing a simple game that involves moving an image from one grid cell to another and I don't have to stack an image on top of another image. Therefore to place an image I have to check whether the new location is empty. In addition the image can only be moved either vertically or horizontally. The user clicks the image to be moved and then the location into which to place the image.  I placed each image in a label on an 8x8 board. To check if the move is horizontal or vertical, I check if the row numbers or column numbers of the source and destination are the same respectively. If row number is the same, for instance from position (row=2,column=1) to (row =2, column =4), I want to loop through positions from column =2 to column = 4 and check if there an image or not. If there is an image in any of those cells i.e. (2,2,), (2,3) or (2,4),  then the move is cancelled. But all the functions about grid only show how to get the column and row numbers but don't give any information on how to get the value if I already know the row and column numbers. Can anyone help on how to go about problem?
Thank you
I believe the grid method you're looking for is grid_slaves(row, column).

w.grid_slaves(row=None, column=None)
Returns a list of the widgets managed by widget w. If no arguments are provided, you will get a
list of all the managed widgets. Use the row= argument to select only the widgets in one row, or
the column= argument to select only the widgets in one column.

Note that although the documentation states to use row= or column=,
in practice, you can specify both and get the widget(s) in a single grid cell.
Being frame the container widget (where the grid is located), calling frame.grid_slaves(row=3, column=2) will give you a list of widgets in that grid cell (or a list with a single item, in case there is only one widget there) or an empty list, if there is none.
how can I retrieve an image from a given grid location if I know the grid row and column in Tkinter?