Does anyone know of a easy way to enter a file at the beginning and add to it on the first line?
I tried doing the following:
f.seek(0)
f.write("....")
f.close()
The only problem is that it doesn't add a new first line with what I want, rather replaces it.
Does anyone know any way, either while writing the file to add the last line on top or after closing it and reopening to add a line to the first line without overwriting or replacing anything?