Python_Institute
PCAP-31-03 · Question #119
What is the expected output of the following code if the file named existing_text_file is a non-zero length text file located inside the working directory?
The correct answer is B. -1. See the full explanation below for the reasoning.
Question
What is the expected output of the following code if the file named existing_text_file is a non-zero length text file located inside the working directory?
Exhibit
Options
- Athe length of the first line from the file
- B-1
- Cthe number of lines contained inside the file
- Dthe length of the last line from the file
How the community answered
(69 responses)- A3% (2)
- B78% (54)
- C13% (9)
- D6% (4)
Community Discussion
No community discussion yet for this question.
