To write a python program for copying the contents from one file to another file.
PC Anaconda - Python 3.7
Create a text file with some content in it.
Open the created text file.
Create another empty text file.
Copy the content of text file to empty file using write function.
#Developed by: Nithilan s
#Register Number: 212223240108
with open("text1.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.