QuestionQ85Verified/Miscellaneous (List Comprehensions, Lambdas, Closures, I/O)Copy linkReport a problemAsk AstroTutorSave questionWhich of these statements is true?Aif invoking open() fails, the value None is returnedBopen() is a function which returns an int that represents a physical file handleCthe second open() argument is optionalDinstd, outstd, errstd are the names of pre-opened streamsShow AnswerAnswerExplanationIn Python, open() accepts an optional second parameter, mode; when omitted, it defaults to text read mode ("rt"). A failed open() call raises an OSError subclass, and successful calls return file objects. The standard streams are named stdin, stdout, and stderr.Show comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion