Working with Huge Text Files
cam.ac.uk at mh391.invalid
Sat Mar 19 02:57:31 CET 2005
mensanator at aol.com wrote:
> It will only be this simple if you can guarantee that the original
> file is actually sorted by the first field.
And if not you can either sort the file ahead of time, or just keep
reopening the files in append mode when necessary. You could sort them
in memory in your Python program but given the size of these files I
think one of the other alternatives would be simpler.
More information about the Python-list