0
I have an Input.txt file , output.txt file, and my .py file, i need to read all text from input file and add it at the START of output file.How can i do this?
Can u help me?
1 Answer
+ 2
open input.txt, read it's content to variable (for ex., txt1). then do the same for output.txt, read it to txt2.
then close both files, open output.txt for writing and write txt1+txt2 to it.
how to read/write files you can find in this tutorial.