Computer Science

To read the remaining lines of the file from a file object infi, we use

  1. infi.read(all)
  2. infi.read()
  3. infi.readline()
  4. infi.readlines()

Python File Handling

3 Likes

Answer

infi.readlines()

Reason — The syntax to read all lines in a file is <filehandle>.readlines(). Hence according to this syntax infi.readlines() is correct format.

Answered By

2 Likes


Related Questions