Skip to main content

createGridWithExactlyOnePath

class Solution:
def createGrid(self, m: int, n: int) -> list[str]:
nRows = m
nCols = n
resp = []

resp.append('.' * nCols)

for row in range(1, nRows):

resp.append(('#' * (nCols - 1)) + '.')

return(resp)