Wednesday, February 24, 2010

Programmer - Fastest Way to Delete a Line from Large File in Python

Programmer Question

Hi all,



I am working with a very large (~11GB) text file. Using an conventional text editor to make changes to the data is not possible based on system resource constraints. I need to remove a specific line - in its entirety - from the file. What is the fastest (in terms of execution time) way to do this in Python?



Thanks,



-aj

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails