Which of the following statements are true? (Choose two.)
Which of the following statements are true? (Choose two.)
If invoking open() fails, an exception is raised which makes statement A true. open() is a function that creates a file object, so statement C is also correct. Statement B is incorrect because open() can take just one argument, the file path, with the mode being optional. Statement D is incorrect because the correct names of the pre-opened streams are stdin, stdout, and stderr, not instd, outstd, and errstd.
answer is correct: AC
C is wrong. According to python doc "mode" is an optional string. instd, outstd. errstd are preopened streams in sys module. Would go then for A and D.
it's not instd, outstd, errstd... "stdin", "stdout" and "stderr" would be the correct ones
it is stdin, stdout, and stderr
A. If invoking open() fails, an exception is raised. D. instd, outstd, errstd are the names of pre-opened streams.
So it is A C right?