To write a python program for copying the contents from one file to another file.
PC Anaconda - Python 3.7
Get the file name and location from the user.
Give a new file name to create a copy of a file content.
Read the file and close the file.
Now write the content in the new file.
When done print "File copied successfully".
End of the program.
Developed by: SILAMBARASAN.K
RegisterNumber: 21500586
with open ('copy1.txt') as c1:
with open ('copy2.txt','w') as c2:
for line in c1:
c2.write(line)
Thus the program is written to copy the contents from one file to another file.