To write a python program for copying the contents from one file to another file.
PC Anaconda - Python 3.7
Open a text file in read mode.
Open another file in append mode.
Using for loop append the text in the first file to the second file
with open("merge.txt",'r') as f1:
with open("merge2.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.