Conversation started May 26, 2020 at 10:15.
May 26, 2020 10:15
@nwp When you use Python's òpen("file") as f:` what does calling the read(12) method like this do?
nwp
nwp
It reads up to 12 characters? This sounds like a trick question.
@nwp hmm, not a trick question. I thought may be it would read 12 bytes.
nwp
nwp
I think it defaults to text mode where it reads characters. open("file", "rb") should read bytes.
Isn't rb default?
May 26, 2020 10:30
@nwp that's very useful to know.
 
Conversation ended May 26, 2020 at 10:30.