1# open both files
2with open('first.txt','r') as firstfile, open('second.txt','a') as secondfile:
3
4 # read content from first file
5 for line in firstfile:
6
7 # write content to second file
8 secondfile.write(line)
9