I need to compare two files line by line. In each file, the line just has either 1 or -1 so if the lines are the same, don't count and if it's different then count =+1.
For example:
File1 line1= 1 , file2 line1 =-1 then count = 1
File1 line2= 1 , file2 line2 =1 Don't count, so count stays 1
I am trying to write it in Python and I know how to readlines in a single file but I am really struggling comparing two files line by line and spotting the difference.
How can this be done? Thanks for your time