Record to a specific line line on Python
📁 вопрос
There was a need to write data in a certain line in a large file for a couple of gigs. More specifically, now you need to read the line, then process it, and then delete it from the text file.
I found a solution consisting in to consider the entire file to the variable, then make changes to the variable and write everything out of the new one, but for a large amount of data, this is obviously not the best option.
can it be more simpler? If not, then the question itself is, how to write data in a specific line without rewriting the entire file?