[Tutor] File Compare
crusier at gmail.com
Fri Jan 9 07:24:56 CET 2015
Thanks for your suggestion.
The ideal of output of this program is to show if there is any new
number added to the new file.
In other words, the file content of file1 [0001.hk, 0002.hk, 0003.hk,
0004.hk] is comparing with the file content of file2 [0001.hk,
0002.hk, 0003.hk, 0005.hk].
The result should be +0005.hk, -0004.hk
Ah. One other thing. Can you explain what you're intending to do
with this statement?
A = file_contentsA.split(',')
My thinking is I want to make both files as a list, so I can compare
the two files. However, as you can see, it is only my wishful
On Fri, Jan 9, 2015 at 1:54 PM, Danny Yoo <dyoo at hashcollision.org> wrote:
>> old_file = open('0105-up.txt','r')
>> file_contentsA = old_file.read()
>> A = file_contentsA.split(",")
> Ah. One other thing. Can you explain what you're intending to do
> with this statement?
> A = file_contentsA.split(',')
> The reason I ask is because neither of your input files that you've
> shown us has a single comma in it, so I do not understand what the
> intent is.
More information about the Tutor