To write a python program for copying the contents from one file to another file.
PC Anaconda - Python 3.7
use open function to open file in which we want to copy.
read the file.
now create new file.
use write function to copy the read file.
the content in the original file will be copied.
End the program
#Developed by: yuvaraj.V
#Ref.no:23013769
with open("python.txt", "r") as firstfile:
with open("empty.txt", "a") as secondfile:
for line in firstfile:
secondfile.write(line)
Thus the program is written to copy the contents from one file to another file.