To write a python program for copying the contents from one file to another file.
PC Anaconda - Python 3.7
Create a file using notepad with extension .txt
Open google colab and mount the drive for using the created file
Now open the text file in read mode
Then read the content in the file in read mode
Now open the new uncreated or an empty file using a different fileby "w+" then derived from first file using write().
End of program
#to copy a file
#Developed By: YASHWINI M
#Register no: 230004946
f=open("Yash.txt","r")
content=f.read()
f1=open("Yash updated.txt","w+")
f1.write(content)
print("The content that has been copied to the new file is",content)
Thus the program is written to copy the contents from one file to another file.