Vidyalelo
Python · Q14

Files Handling in Python

Programming · Python · question 14

Q14

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

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

Answer: Option B

Solution

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