Created
November 26, 2013 20:52
-
-
Save palcu/7666014 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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