In my script I am using r+ to read the file, and the write to it also. However, this places the pointer at the start of the file, so it overwrites anything that overlaps the new content that is being written.
My question is this. Say we have a document like this, in a txt format:
Code: Select all
Apple Orange Pear Grape
Ford Citroen TVR FerrariCode: Select all
Pepsi Fanta Sprite 7-UpCode: Select all
Pepsi Fanta Sprite 7-Up
Apple Orange Pear Grape
Ford Citroen TVR FerrariThanks