Question:

Match List-I with List-II:
List-IList-II
(A) readline()(I) Writes a sequence of strings to the file
(B) writelines()(II) Reads a single line from the file
(C) seek()(III) Force any buffered output to be written to the file
(D) flush()(IV) Moves the file pointer to the specified position

Updated On: Nov 4, 2024
  • (A) - (I), (B) - (II), (C) - (III), (D) - (IV)
  • (A) - (II), (B) - (I), (C) - (IV), (D) - (III)
  • (A) - (II), (B) - (I), (C) - (III), (D) - (IV)
  • (A) - (III), (B) - (IV), (C) - (I), (D) - (II)
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Each file operation serves a different purpose: readline() reads one line, writelines() writes multiple strings, seek() moves the pointer, and flush() writes unsaved data.
Was this answer helpful?
0
0