On May 29, 6:36 pm, loial <[EMAIL PROTECTED]> wrote:
> I have a requirement to compare 2 text files and write to a 3rd file
> only those lines that appear in the 2nd file but not in the 1st file.
>
> Rather than re-invent the wheel I am wondering if anyone has written
> anything already?
You can use the cmp(x, y) function to tell if a string is similar to
another.

going cmp('spam', 'eggs') will return 1 (spam is greater than eggs)
(have no idea why)
swapping the two give -1
and having 'eggs' and 'eggs' gives 0.

is that what you were looking for?
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to