Created
March 12, 2013 08:55
-
-
Save shonenada/5141283 to your computer and use it in GitHub Desktop.
Compare two files, show which line is not equal..
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
file1 = open("file1", "r") | |
file2 = open("file2", "r") | |
line1 = file1.readlines() | |
line2 = file2.readlines() | |
for i in range(0, len(line1)): | |
if(line1[i] != line2[i]): | |
print i+1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment