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


• To open a text file "MYPET.TXT" in write mode

• To open a text file "MYPET.TXT" in read mode


Answer =

fl = open ("MYPET.TXT", 'w')
f2 = open ("MYPET.TXT", 'r')

Post a Comment

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

Previous Post Next Post