Skip to content

Instantly share code, notes, and snippets.

@Gwith
Created August 7, 2016 21:05
Show Gist options
  • Save Gwith/698a5a5598676e2808be6b9379cef755 to your computer and use it in GitHub Desktop.
Save Gwith/698a5a5598676e2808be6b9379cef755 to your computer and use it in GitHub Desktop.
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', '.', '.', '.'],
['.', '.', '.', '.', '.', '.']]
for j in range(len(grid[0])): #iterate 6 times
for i in range(len(grid)): #iterate 9 times
print(grid[i][j],end='')
print('')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment