Computer Science

To read the entire contents of the file as a string from a file object fobj, the command should be:

  1. fobj.read(2)
  2. fobj.read()
  3. fobj.readline()
  4. fobj.readlines()

Python Data Handling

3 Likes

Answer

fobj.read()

Reason — The command fobj.read() is used to read the entire contents of the file as a string from a file object fobj.

Answered By

2 Likes


Related Questions