Write the statement in python to perform the following operations.
i) To open a text file “Mypet.txt in write mode”.
ii) To open a text file “Mypet.txt” in read mode.
Answers
Answered by
3
with open("Mypet.txt", "w") as f:
pass
with open("Mypet.txt") as f:
pass
Answered by
5
Answer:
with open("Mypet.txt", "w") as f:
pass
with open("Mypet.txt") as f:
pass
Similar questions