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 :NARMADHA SREE S
# REGISTER NO:212223240105
with open("text.txt",'r') as fp:
msg1=fp.read()
with open("copytxt",'w') as fp1:
fp1.write(msg1)
Thus the program is written to copy the contents from one file to another file.