Home >>Python File Methods >Python File tell() Method
Python File tell() Method in python file can be used to returns the current position of the file object /position pointer within the file. This method returns an integer value and takes no parameter.
Syntax:file.tell()Here is an example of Python File tell() Method:
x = open("file1.txt", "r")
print(x.tell())
y= open("file2.txt", "r")
print(y.readline())
print(y.tell())