Question:

Match List I with List II
LIST ILIST II
A. write linesIII. Writing a sequence of string
B. pickleI. Module for binary files
C. try-exceptIV. Exception handling
D. rbII. Opening and reading a binary file

Show Hint

In Python, understanding the purpose of different functions and modules helps in associating them with the correct operations. For example, 'pickle' is related to serialization, 'writelines' is for writing strings, 'try-except' handles exceptions, and 'rb' is for reading binary files.
Updated On: Apr 24, 2025
  • A-III, B-IV, C-II, D-I
  • A-IV, B-I, C-III, D-II
  • A-III, B-IV, C-I, D-II
  • A-III, B-I, C-IV, D-II
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

- A. writelines: This is used to write a sequence of strings to a file, so it matches with III.
- B. pickle: This module is used for serializing and deserializing objects, which is related to exception handling, so it matches with IV.
- C. try-except: This is used for handling exceptions, so it matches with II.
- D. rb: This is used for opening and reading a binary file, so it matches with I.
Was this answer helpful?
0
0