+ 1

If a file write operation is successful, which one of these statements will be true?

how is the answer file.write(msg) == len(msg)

23rd Sep 2020, 3:26 AM
Jrod
Jrod - avatar
1 ответ
+ 8
file.write(msg) writes the contents of msg to the file, returning the number of characters written. If this return value is equal to the length of msg, this means that the entire content of msg has been successfully written to file.
23rd Sep 2020, 3:35 AM
Hatsy Rei
Hatsy Rei - avatar