Hey i'm a super beginner, and hope i could get some help with my issue.
prompt='> '
fin1=raw_input(prompt)
fin2=raw_input(prompt)
o1=open(fin1, 'r+')
o2=open(fin2, 'r+')
r1=o1.read()
o2.write(r1)
o1.close()
o2.close()
o3=open(fin2)
print o3.read()
o3.close()
What I'm trying to do is make the text in file 'fin1' copied into 'fin2', the problem is that when the program is done running the text file 'fin2' becomes an exact copy of 'fin1', deleting everything there was inside of fin2 before the program was run. Is there a way i can add text to the fin2 file while retaining all the text inside of it?
Sorry if this is a dumb question, i have just started out and was confused. And Thanks in advance:)