Test Index
File Handling in Python
© examsnet.com
Question : 33 of 37
Marks:
+1,
-0
The correct syntax of
tell() is :[CBSE 2023 Compartment]
Solution:
Concept:
tell() is a method of the file object. It takes no argument and returns the current position of the file pointer (in bytes from the beginning of the file).Explanation:A method is called with the object name first:f = open("data.txt", "r")print(f.tell()) # 0 at the startSo the syntax is file_object.tell().Answer:Option B (file_object.tell())© examsnet.com
Go to Question: