To write a python program for copying the contents from one file to another file.
PC Anaconda - Python 3.7
Open the first file in read mode.
Open the second file in append mode.
Every word in the first file is copied to second file using write()
Close the first file.
Close the second file.
Python program for copying a file.
Program developed by:Samyuktha.S
Reference number:22005276
f1=open("f11.txt","r")
f2=open("f12.txt","a")
for line in f1:
f2.write(line)
f1.close()
f2.close()
Thus the program is written to copy the contents from one file to another file.