def coords_to_num(coords):
    """
    >>> coords_to_num((1,1,1,1))
    1
    >>> coords_to_num((3,3,3,3))
    81
    >>> coords_to_num((1,1,1,3))
    3
    >>> coords_to_num((1,3,1,1))
    7
    >>> coords_to_num((3,3,3,1))
    79
    >>> coords_to_num((3,3,2,2))
    71
    >>> coords_to_num((2,1,1,1))
    28
    >>> coords_to_num((2,2,2,2))
    41
    """
    x1, y1, x2, y2 = coords
    row, col = (x1-1) * 3 + x2, (y1-1) * 3 + y2  # row,col on 9x9 board
    return (row-1) * 9 + col
def coords_to_num ( coords ) : x1 , y1 , x2 , y2 = coords row , col = ( x1 - 1 ) * 3 + x2 , ( y1 - 1 ) * 3 + y2 return ( row - 1 ) * 9 + col
>>> coords_to_num((1,1,1,1))
    1
    >>> coords_to_num((3,3,3,3))
    81
    >>> coords_to_num((1,1,1,3))
    3
    >>> coords_to_num((1,3,1,1))
    7
    >>> coords_to_num((3,3,3,1))
    79
    >>> coords_to_num((3,3,2,2))
    71
    >>> coords_to_num((2,1,1,1))
    28
    >>> coords_to_num((2,2,2,2))
    41