

InterviewSolution
Saved Bookmarks
1. |
How do you change the file position to an offset value from the start?(a) fp.seek(offset, 0)(b) fp.seek(offset, 1)(c) fp.seek(offset, 2)(d) none of the mentionedThe question was asked during an interview for a job.Enquiry is from Files topic in portion Regular Expressions and Files of Python |
Answer» RIGHT answer is (a) fp.seek(offset, 0) EXPLANATION: 0 indicates that the offset is with RESPECT to the start. |
|