Untitled

mail@pastecode.io avatar
unknown
plain_text
7 days ago
678 B
6
Indexable
Never
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', '.', '.', '.'],
        ['.', '.', '.', '.', '.', '.']]

new_grid = []

grid_col = 0
for item in range(6):
    grid_row = 0
    new_row = [] # Create a new row
    for item in range(9):
            new_row.append(grid[grid_row][grid_col])
            grid_row += 1
    new_grid.append(new_row)
    grid_col += 1

for item in new_grid:
    print(*item)
Leave a Comment