To write a python program for copying the contents from one file to another file.
PC Anaconda - Python 3.7
open the first line using with open('fi.txt','a') as firstfile
open the second file using with open('f2.txt,'a') as secondfile
use for the loop to write in secondline
write in the secondline using secondfile.write(line)
print the output
end the program
Developed by: Soundariyan M N
Register no : 22008347
with open('f1.txt','r') as firstfile:
with open('f2.txt','a') as secondfile:
for line in firstline:
secondfile.write(line)
Thus the program is written to copy the contents from one file to another file.