-->

Stacks & Queues In List

Question
CBSEENCO12011642

Write a statement in Python to perform the following operations:

  • To open a text file “BOOK.TXT” in read mode
  • To open a text file “BOOK.TXT” in write mode

Solution
f1 = open('BOOK.TXT','r')
f2 = open('BOOK.TXT','w')