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')

 

 

2 Comments

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

Post a Comment

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

Previous Post Next Post