To write a python program for copying the contents from one file to another file.
PC Anaconda - Python 3.7
Open the file f1 in read mode.
Open the file f2 in append mode.
Copy the contents using write() with the for loop.
End the program.
#Developed By:Giftson rajarathianam N
#Register No: 212222233002
with open('f11.txt','r') as f1:
with open ('f12.txt','a') as f2:
for line in f1:
f2.write(line)
Thus the program is written to copy the contents from one file to another file.