adplus-dvertising
frame-decoration

Question

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

a.

outfile = open(“c:\scores.txt”, “w”)

b.

outfile = open(“c:\\scores.txt”, “w”)

c.

outfile = open(file = “c:\scores.txt”, “w”)

d.

outfile = open(file = “c:\\scores.txt”, “w”)

Posted under Python

Answer: (b).outfile = open(“c:\\scores.txt”, “w”)

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

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