Which out of the following mode is required to be used while opening a binary file to allow read as well as write operations in a Python program?
Show answerHide answer
Correct answer: (D) rb+
Explanation
'rb+' opens an existing binary file for both reading and writing. 'r+' is the text-mode version, and 'wb'/'ab' only write or append.