Consider the following Python code and answer the question given below: with…

PYQ EMRS TGT/PGT (ESSE) 2023

Consider the following Python code and answer the question given below:

with open("NOTES.TXT", "r") as F:

Line=F.readlines()

__________ # statement 1

Which of the following Python statements will find and display the number of lines present in the file "NOTES.TXT" ?

  1. A.

    print(len(LINE))

  2. B.

    print(LINE.count())

  3. C.

    print(LINE.count('\n'))

  4. D.

    print(LINE.len())

Attempted by 2006 students.

Sign up free to check your answer

Sign up free

Explore the full course: Emrs Cs Tier 2

Loading lesson…