

InterviewSolution
Saved Bookmarks
1. |
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”)The question was posed to me in exam.This intriguing question originated from Files topic in section Regular Expressions and Files of Python |
Answer» The correct choice is (B) outfile = open(“c:\\scores.txt”, “W”) |
|