Skip to content

Instantly share code, notes, and snippets.

@vpatov
Created August 17, 2017 14:39
Show Gist options
  • Save vpatov/80386dbe13b4dec318d767153a82ca6b to your computer and use it in GitHub Desktop.
Save vpatov/80386dbe13b4dec318d767153a82ca6b to your computer and use it in GitHub Desktop.
Problem 7
grids = []
with open('input_7.txt','r') as f:
while(True):
grid = []
line = f.readline()
if (len(line) < 1):
break
width,height = (int(i) for i in line.split())
for row in range(height):
line = f.readline().strip()
grid.append(list(line))
grids.append(grid)
print(grids)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment