Home »
MCQs »
Python MCQs
Amongst which of the following is / are the method used to unpickling data from a binary file?
73. Amongst which of the following is / are the method used to unpickling data from a binary file?
- load()
- set() method
- dump() method
- None of the mentioned above
Answer: B) set() method
Explanation:
The load() method is used to unpickle data from a binary file that has been compressed. The binary read (rb) mode is used to load the file that is to be loaded. If we want to use the load() method, we can write Store object = load(file object) in our program. The pickled Python object is loaded from a file with a file handle named file object and stored in a new file handle named store object. The pickled Python object is loaded from a file with a file handle named file object and stored in a new file handle named store object.