i would like to add the content of one file at the end of the content of the other file. i have let say:
The content of the file1 is : james@29@458462
The content of the file2 is : marc@45@4695588
after appending file2 into file1 i would like to have:
james@29@458462
marc@45@4695588
This is the code i tried to use but it replace the content of the target file with the source file:
file1=open("test1.txt","a")
file2=open("test2.txt","r")
file1.write(file2.read())
Can i please have a way of appending at the end of one file without replacing the content of the target file?
Thank you