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: DEEPAK RAJ S
REG NO: 212222240023s
with open('F!.txt','r') as f1:
with open ('F2.txt','a') as f2:
for line in f1:
f2.write(line)
Thus the program is written to copy the contents from one file to another file.