1.

How do you get the current position within the file?(a) fp.seek()(b) fp.tell()(c) fp.loc(d) fp.posI have been asked this question during an interview.This intriguing question originated from Files in division Regular Expressions and Files of Python

Answer»

Right ANSWER is (B) fp.tell()

Easy explanation - It gives the current position as an OFFSET from the start of FILE.



Discussion

No Comment Found

Related InterviewSolutions