This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# open both files | |
with open('first.txt','r') as firstfile, open('second.txt','a') as secondfile: | |
# read content from first file | |
for line in firstfile: | |
# append content to second file | |
secondfile.write(line) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("test gist created") |