Skip to content

Instantly share code, notes, and snippets.

@Gwith
Created August 7, 2016 21:56
Show Gist options
  • Save Gwith/5e601afcde90a6bfaf122b8ffc4a9c1f to your computer and use it in GitHub Desktop.
Save Gwith/5e601afcde90a6bfaf122b8ffc4a9c1f 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