1.

Which of the following is not a valid mode to open a file?(a) ab(b) rw(c) r+(d) w+I got this question by my school principal while I was bunking the class.I need to ask this question from Files topic in section Regular Expressions and Files of Python

Answer»

The CORRECT option is (b) rw

Best explanation: Use r+, w+ or a+ to perform both read and WRITE operations USING a SINGLE FILE object.



Discussion

No Comment Found

Related InterviewSolutions