Advertisements
Advertisements
प्रश्न
Assertion (A): For a binary file opened using ‘rb’ mode, the pickle.dump() method will display an error.
Reason (R): The pickle.dump() method is used to read from a binary file.
विकल्प
Both Assertion (A) and Reason (R) are true and Reason (R) is the correct explanation for Assertion (A).
Both Assertion (A) and Reason (R) are true and Reason (R) is not the correct explanation for Assertion (A).
Assertion (A) is true but, Reason (R) is false.
Assertion (A) is false but, Reason (R) is true.
MCQ
अभिकथन और तर्क
Advertisements
उत्तर
Assertion (A) is true but, Reason (R) is false.
Explanation:
pickle.dump() method writes data to a binary file, hence for files opened with “rb” (read binary) Mode the above method will give an error.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
