In: Computer Science
Write a statement that opens the file 'final.txt' in append mode and assigns it to my_file. PYTHON
my_file=open("final.txt", "a+")
for proof
lets initially we have final.txt file like this

code
my_file=open("final.txt", "a+")
for i in range(2):
my_file.write("Appended line %d\r\n" % (i+1))
after running above code the final text file is
If you have any query regarding the code please ask me in the comment i am here for help you. Please do not direct thumbs down just ask if you have any query. And if you like my work then please appreciates with up vote. Thank You.