Vidyalelo
Python · Q10

Files Handling in Python

Programming · Python · question 10

Q10

To open a file c: .txt for reading, we use . . . . . . . .

A.
infile = open(“c:\scores.txt”, “r”)
B.
infile = open(“c:\\scores.txt”, “r”)
Answer
C.
infile = open(file = “c:\scores.txt”, “r”)
D.
infile = open(file = “c:\\scores.txt”, “r”)

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board