Single Choice Not Set

QTo read the entire remaining contents of the file as a string from a file object infile, we use ____________

ID: #3656 Python File Handling 189 views
Question Info
#3656Q ID
Not SetDifficulty
Python File HandlingTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A infile.read(2)
  • B infile.read()
  • C infile.readline()
  • D infile.readlines()
Correct Answer

Explanation

In read () function, if n is not specified then it reads entire file.

Share This Question

Challenge a friend or share with your study group.