read and delete only one line of a file?
Posted: Thu Jul 04, 2019 7:36 am
How can i do that without using readlines and writelines (since the file is too big for the mem).
Code: Select all
with open(infile,'r') as ifile: for line in ifile: <do something with line> if everthing is iO delete line in file else leave line in file