adplus-dvertising
frame-decoration

Question

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

a.

infile = open(“c:\scores.txt”, “r”)

b.

infile = open(“c:\\scores.txt”, “r”)

c.

infile = open(file = “c:\scores.txt”, “r”)

d.

infile = open(file = “c:\\scores.txt”, “r”)

Posted under Python

Answer: (b).infile = open(“c:\\scores.txt”, “r”)

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 reading, we use