Skip to content

Instantly share code, notes, and snippets.

@palcu
Created November 26, 2013 20:52
Show Gist options
  • Save palcu/7666014 to your computer and use it in GitHub Desktop.
Save palcu/7666014 to your computer and use it in GitHub Desktop.
# read and convert the matrix
s = 0
for i in range(lines):
m.append([1 if j == '#' else 0 for j in f.readline()])
s += sum(m[-1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment