Write the file mode that will be used for opening the following file. Also, write the Python statement to open the following file: a binary file “bfile.dat” in write mode.
Advertisements
Question
Write the file mode that will be used for opening the following file. Also, write the Python statement to open the following file:
a binary file “bfile.dat” in write mode.
One Line Answer
Advertisements
Solution
“wb”
file_handle = open(“bfile.dat”, “wb”)
shaalaa.com
Types of Files in Python
Is there an error in this question or solution?
