<gh_stars>0
# Say you have a list of lists where each value in the inner lists is a one-character string, like this:
#
#
# grid = [['.', '.', '.', '.', '.', '.'],
#         ['.', 'O', 'O', '.', '.', '.'],
#         ['O', 'O', 'O', 'O', '.', '.'],
#         ['O', 'O', 'O', 'O', 'O', '.'],
#         ['.', 'O', 'O', 'O', 'O', 'O'],
#         ['O', 'O', 'O', 'O', 'O', '.'],
#         ['O', 'O', 'O', 'O', '.', '.'],
#         ['.', 'O', 'O', '.', '.', '.'],
#         ['.', '.', '.', '.', '.', '.']]
#
# You can think of grid[x][y] as being the character at the x- and y-coordinates of a
# “picture” drawn with text characters. The (0, 0) origin will be in the upper-left corner,
# the x-coordinates increase going right, and the y-coordinates increase going down.
#
# Copy the previous grid value, and write code that uses it to print the image.
#
#
# ..OO.OO..
# .OOOOOOO.
# .OOOOOOO.
# ..OOOOO..
# ...OOO...
# ....O....


def image_grid(grid):
    x_range = len(grid[0])
    y_range = len(grid)
    for x in range(x_range):
        for y in range(y_range):
            print(grid[y][x], end='')
        print('')


grid = [['.', '.', '.', '.', '.', '.'],
        ['.', 'O', 'O', '.', '.', '.'],
        ['O', 'O', 'O', 'O', '.', '.'],
        ['O', 'O', 'O', 'O', 'O', '.'],
        ['.', 'O', 'O', 'O', 'O', 'O'],
        ['O', 'O', 'O', 'O', 'O', '.'],
        ['O', 'O', 'O', 'O', '.', '.'],
        ['.', 'O', 'O', '.', '.', '.'],
        ['.', '.', '.', '.', '.', '.']]

image_grid(grid)

# Say you have a list of lists where each value in the inner lists is a one-character string, like this:
#
#
# grid = [['.', '.', '.', '.', '.', '.'],
#         ['.', 'O', 'O', '.', '.', '.'],
#         ['O', 'O', 'O', 'O', '.', '.'],
#         ['O', 'O', 'O', 'O', 'O', '.'],
#         ['.', 'O', 'O', 'O', 'O', 'O'],
#         ['O', 'O', 'O', 'O', 'O', '.'],
#         ['O', 'O', 'O', 'O', '.', '.'],
#         ['.', 'O', 'O', '.', '.', '.'],
#         ['.', '.', '.', '.', '.', '.']]
#
# You can think of grid[x][y] as being the character at the x- and y-coordinates of a
# “picture” drawn with text characters. The (0, 0) origin will be in the upper-left corner,
# the x-coordinates increase going right, and the y-coordinates increase going down.
#
# Copy the previous grid value, and write code that uses it to print the image.
#
#
# ..OO.OO..
# .OOOOOOO.
# .OOOOOOO.
# ..OOOOO..
# ...OOO...
# ....O....


def image_grid(grid):
    x_range = len(grid[0])
    y_range = len(grid)
    for x in range(x_range):
        for y in range(y_range):
            print(grid[y][x], end='')
        print('')


grid = [['.', '.', '.', '.', '.', '.'],
        ['.', 'O', 'O', '.', '.', '.'],
        ['O', 'O', 'O', 'O', '.', '.'],
        ['O', 'O', 'O', 'O', 'O', '.'],
        ['.', 'O', 'O', 'O', 'O', 'O'],
        ['O', 'O', 'O', 'O', 'O', '.'],
        ['O', 'O', 'O', 'O', '.', '.'],
        ['.', 'O', 'O', '.', '.', '.'],
        ['.', '.', '.', '.', '.', '.']]

image_grid(grid)
# Say you have a list of lists where each value in the inner lists is a one-character string, like this: # # # grid = [['.', '.', '.', '.', '.', '.'], #         ['.', 'O', 'O', '.', '.', '.'], #         ['O', 'O', 'O', 'O', '.', '.'], #         ['O', 'O', 'O', 'O', 'O', '.'], #         ['.', 'O', 'O', 'O', 'O', 'O'], #         ['O', 'O', 'O', 'O', 'O', '.'], #         ['O', 'O', 'O', 'O', '.', '.'], #         ['.', 'O', 'O', '.', '.', '.'], #         ['.', '.', '.', '.', '.', '.']] # # You can think of grid[x][y] as being the character at the x- and y-coordinates of a # “picture” drawn with text characters. The (0, 0) origin will be in the upper-left corner, # the x-coordinates increase going right, and the y-coordinates increase going down. # # Copy the previous grid value, and write code that uses it to print the image. # # # ..OO.OO.. # .OOOOOOO. # .OOOOOOO. # ..OOOOO.. # ...OOO... # ....O....