Skip to content

Instantly share code, notes, and snippets.

@Deep18-03
Created April 19, 2020 06:44
Show Gist options
  • Save Deep18-03/74e4e22a34d1e02703488781d9fe9a44 to your computer and use it in GitHub Desktop.
Save Deep18-03/74e4e22a34d1e02703488781d9fe9a44 to your computer and use it in GitHub Desktop.
#seek(),tell()
f=open('deep.txt')
print(f.tell()) #it will tell the pointer of file
print(f.readline())
print(f.tell())
print(f.seek(0)) #it will reset the pointer of file
print(f.readline())
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment