I got txt file A with 300, 000+ lines and txt file B with 600, 000+ lines. Now what I want to do is to sift through file A line by line, if that line does not appear in file B then it will be appended to file C. 
Well, the problem is if I program like what I said above, it literally takes ages to finish all the job. So is there a better way to do this?
Don't know anything about python, but: how about sorting the file A into a particular order? Then you can go through file B line by line and do a binary search - more efficient.
What's the fastest way to find unique lines from huge file A as compared to huge file B using python?