Q. Write a statement in Python to perform the following operations:


(a) To open a text file "BOOK.TXT" in read mode.

(b) To open a text file "BOOK.TXT" in write mode.


Answer =

(a)
File = open ("BOOK.txt", 'r')

(b)
File = open ("BOOK.txt", 'w')

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post