

InterviewSolution
Saved Bookmarks
1. |
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”)This question was posed to me in an online quiz.Question is from Files in chapter Regular Expressions and Files of Python |
Answer» CORRECT option is (b) INFILE = OPEN(“c:\\scores.txt”, “r”) Best EXPLANATION: Execute help(open) to GET more details. |
|