Im very new to python, and im trying to plot a graph. I have a print () which prints the output of my battery voltage to a txt file called "output.txt.

Python Script

```
 f = open("C:\Scripts\output.txt", "w")

   print("{0:.1f} V".format(voltage/10.0),file=f) #battery voltage

  f.close()

```

Now the values just keeps updating in the first line of the txt file everytime the script is run. And i know its happening because i use the "w".

Is there a way that i can write the first 10 values and then start updating the 11 value from the top by deleting the rest of the old values.
Any help is appreciated . Thanks a lot for your time!!