Examveda

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”)

Answer: Option B


This Question Belongs to Python Program >> Files Handling In Python

Join The Discussion

Related Questions on Files Handling in Python