Created
August 18, 2012 03:53
-
-
Save s-hiiragi/3384244 to your computer and use it in GitHub Desktop.
count line
This file contains 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
import glob | |
if __name__ == '__main__': | |
paths = glob.glob('./*/data/*.csv') | |
cnt = 0 | |
for path in paths: | |
with open(path, 'r') as f: | |
cnt += reduce(lambda x,y: x+1, f, 0) | |
print cnt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment