Is 'b' mode okay? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Is 'b' mode okay?

If we use only 'b' then what will be the output?

8th Feb 2019, 12:30 PM
Md. Tahmid Hasan
Md. Tahmid Hasan - avatar
1 Answer
+ 3
You will only get the byte string of a file, opening file in read byte "rb" mode should not have any effect to the file. But opening the file in write byte "wb" will clear the data from the file.
8th Feb 2019, 12:46 PM
Seb TheS
Seb TheS - avatar