Created
August 27, 2014 08:10
-
-
Save soon/91116ff1a0042a3d131b to your computer and use it in GitHub Desktop.
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 os | |
with open('original', 'r') as o: | |
original = set(o.readlines()) | |
with open('report.txt', 'w') as report: | |
for subdir, _, files in os.walk('submissions_462'): | |
for f in files: | |
with open(os.path.join(subdir, f), 'r') as file: | |
s = set(file.readlines()) | |
report.write('{}: {}\n'.format(f, len(original & s))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment