Computer Science
Functions readline() and readlines() are essentially the same.
Python File Handling
2 Likes
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.
Answered By
1 Like
Related Questions
The types of operations that can be carried out on a file depend upon the file mode a file is opened in.
If no path is given with a file name in the file open(), then the file must exist in the current directory.
Python automatically flushes the file buffers before closing a file with close() function.
When you open a file for writing, if the file does not exist, a new file is created.