List-I | List-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 |
Let's match the functions with their descriptions:
Therefore, the correct matching is:
(A) - (II)
(B) - (I)
(C) - (IV)
(D) - (III)
This corresponds to option (2).
Additional Context:
List I | List II | ||
A. | tell() | I. | This function used to position the file object at particular position in a file |
B. | seek() | II. | This function returns an integer that specifies the current position of the object in the file |
C. | dump() | III. | This function is used to convert Python objects for writing data in a binary file |
D. | load() | IV. | This function is used to load data from a binary file |
List-I (Words) | List-II (Definitions) |
(A) Theocracy | (I) One who keeps drugs for sale and puts up prescriptions |
(B) Megalomania | (II) One who collects and studies objects or artistic works from the distant past |
(C) Apothecary | (III) A government by divine guidance or religious leaders |
(D) Antiquarian | (IV) A morbid delusion of one’s power, importance or godliness |