Find diagonal positions for bishop movement
The biggest problem you have is you have five lines that are nearly identical, four times.


row = coord[0]
col = coord[1]

while row &gt; 0 and col &gt; 0:
    row -= 1
    col -= 1



There is two ways to come at this. (1) make a function that yield the rows and columns. (2) use zip and range.

The first way you need to enter a start, limit and step for both the x and y axis.
You then need to limit all inputs by 0 &lt; x &lt; x_limit, and the same for the y axis too.
This is as we don't really know what direction we're going.
We then add the step to x each iteration.
This can make:

def _diagonal(x, y, x_limit, y_limit, x_diff, y_diff):
    while 0 &lt; x &lt; x_limit and 0 &lt; y &lt; y_limit:
        x += x_diff
        y += y_diff
        yield (x, y)


Where you'd use it like:

for x, y in _diagonal(row, col, limit, limit, 1, 1):
    coords.append((x, y))


However this is quite alike to range, we enter a start, limit and step in both.
Take range(row + 1, limit, 1).
To then get both x and y you need to use zip which works perfectly as it stops iterating when any of the inputs stop.
And so you can get:

for x, y in zip(range(row + 1, limit, 1), range(col + 1, limit, 1)):
    coords.append((x, y))


This I would say is better than creating your own function as you don't really have to implement anything yourself.

Either way you'll want to remove the duplicate code to append to coords.
To do this you can use itertools.chain.
This lets you chain iterators to become one iterator.
So since you want a list as output you'll have to 'wrap' the call in a list call.

This can get you:

from itertools import chain

def diagonals(coord, size):
    x, y = coord
    return list(chain(
        [(x, y)],
        zip(range(x - 1, -1, -1), range(y - 1, -1, -1)),
        zip(range(x + 1, size, 1), range(y + 1, size, 1)),
        zip(range(x + 1, size, 1), range(y - 1, -1, -1)),
        zip(range(x - 1, -1, -1), range(y + 1, size, 1)),
    ))

print(diagonals((3, 4), 8))