Q.

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» B. outfile = open(“c:\\scores.txt”, “w”)
Explanation: w is used to indicate that file is to be written to.
1.7k
0
Do you find this helpful?
16

Discussion

No comments yet