+ 1
seeking in python
How can I insert text in the middle of a text file as I can't seek in the append mode?
1 Antwort
+ 6
What you can do is to read the complete file line by line in a list. Then identify the position where you want to insert the new text. Insert new data in the list, and finally write back the complete file to the hard drive.