Horacius ReX wrote: > Hi, > > I need to write a program which reads an external text file. Each time > it reads, then it needs to delete some lines, for instance from second > line to 55th line. The file is really big, so what do you think is the > fastest method to delete specific lines in a text file ?
Not using a file but a database instead. If that's not possible, you can't do anything but open/read/filter/write - filesystems (at least not the known ones) don't support random deletion. Diez -- http://mail.python.org/mailman/listinfo/python-list