def create_grid(
    x: int,
    y: int,
    d: int,
    ) -> list:
    """Create a grid of digits

    Parameters
    ----------
    x : int
        The number of elements in the x-direction
    y : int
        The number of elements in the y-direction
    d : int
        The digit to create the grid of

    Returns
    -------
    list
        The representative grid
    """
    grid = [[d]*(x) for i in range(y)]

    if y == 1:

        grid = grid[0]

    return grid