Sorting Large File (Code/Performance)
Stefan Behnel
stefan.behnel-n05pAM at web.de
Thu Jan 24 16:35:57 EST 2008
Ira.Kovac at gmail.com wrote:
>> What are you going to do with it after it's sorted?
> I need to isolate all lines that start with two characters (zz to be
> particular)
"Isolate" as in "extract"? Remove the rest?
Then why don't you extract the lines first, without sorting the file? (or sort
it afterwards if you still need to). That would heavily cut down your memory
footprint.
Stefan
More information about the Python-list
mailing list