CBSE Class 12 Computer Science
Question 107 of 136
Data File Handling — Question 46
Back to all questions(a) To open a text file "BOOK.TXT" in read and append mode :file_read_append = open("BOOK.TXT", "a+")
(b) To open a text file "BOOK.TXT" in write mode :file2 = open("BOOK.TXT", "w")
(c) To open a text file "BOOK.TXT" in append mode :file_append = open("BOOK.TXT", "a")