Python Programming - Reading and Writing Files - Discussion

Discussion Forum : Reading and Writing Files - General Questions (Q.No. 1)
1.
How can you open a file named "example.txt" in Python for reading?
open("example.txt", "w")
open("example.txt", "r")
open("example.txt", "a")
open("example.txt", "x")
Answer: Option
Explanation:
To open a file for reading, you should use the mode "r" in the open() function.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.