1.

Which of the following statements are true?(a) When you open a file for reading, if the file does not exist, an error occurs(b) When you open a file for writing, if the file does not exist, a new file is created(c) When you open a file for writing, if the file exists, the existing file is overwritten with the new file(d) All of the mentionedI had been asked this question by my school teacher while I was bunking the class.My question is based upon Files topic in chapter Regular Expressions and Files of Python

Answer» CORRECT ANSWER is (d) All of the mentioned

The explanation is: The program will THROW an ERROR.


Discussion

No Comment Found

Related InterviewSolutions