CBSE Class 12 Computer Science Question 74 of 145

File Handling — Question 9

Back to all questions
9
Question

Question 9

Functions readline() and readlines() are essentially the same.

Answer

False

Reason — In Python, the readline() function reads a single line from the file and returns it as a string, while the readlines() function reads all lines from the file and returns them as a list of strings.