The pickle module provides two methods to work with binary files. They are:
A. load()
B. unload()
C. dump()
D. clean()
The pickle module provides two methods to work with binary files. They are:
A. load()
B. unload()
C. dump()
D. clean()
Solution
✅ Correct Option: 2
The pickle module's two methods for binary files are and . writes (serialises) a Python object into a binary file, and reads it back (deserialises).
The file must be opened in binary mode, for example "wb" for and "rb" for .
B and D: and do not exist in the pickle module.
Related questions:
2025: 15 May Shift 2
2025: 14 May Shift 1
2026: 21 May Shift 1
2025: 27 May Shift 2