+ 3
After "print(file.read (16))" does "print(file.read read(4))" start on the 17th byte? or start back at the 1st?
In question 2/4 the code writes: file = open("filename.txt","r") print(file.read (16)) print(file.read (4)) print(file.read (4)) print(file.read (4)) file.close () Does the program read 16 bytes and start over when it gets on the next line or does it continue where it left off?
4 Answers
+ 3
After 16 bytes it will start from 17th when the next read() is encountered as the pointer is now on 17th byte and no command has been given to move it back to the top again.
0
it starts where it left off
0
Yeah it will start where it left off
- 6
from the 1st i think