[Tutor] compare and arrange file
Dave Angel
d at davea.name
Tue Jul 12 13:28:37 CEST 2011
On 07/12/2011 12:56 AM, Edgar Almonte wrote:
> thanks emile i understand exactly what you explain me but i was unable
> to accomplish it ( too noob in python ) but i solved the problem with
> this code
> http://pastebin.com/4A6Jz4wZ
>
(When you post on this list, your comments should follow the pieces
you're responding to. That's a long-standing convention.)
As I explained earlier, your nested loops won't work correctly, as you
fail to re-open the orig1 file. Since you still seem to think it'll
work, I'll just hope this assignment is for fun, and not for anything
that matters.
In particular, the first line will be compared to all the others. But
if the third line should have matched the seventh, it won't get written out.
--
DaveA
More information about the Tutor
mailing list