Answer the question
In order to leave comments, you need to log in
How to remove read lines from txt or csv file?
There is a file that contains data separated by the \n character (or a csv file with one column). When reading line by line, you need to delete the read lines, for example:
file.readline()
.... # Actions with data
file.delete line / lines
The point is not to load the entire file into memory as a whole.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question