To open a file c:\ for writing, we use
A. outfile = open(“c:\”, “r”)
B. outfile = open(“c:\\”, “w”)
C. outfile = open(file = “c:\”, “r”)
D. outfile = open(file = “c:\\”, “o”)
Answer:B
To open a file c:\ for writing, we use
A. outfile = open(“c:\”, “r”) B. outfile = open(“c:\\”, “w”) C. outfile = open(file = “c:\”, “r”) D. outfile = open(file = “c:\\”, “o”)