Seek () and Tell () Methods in Python File Handling | Crack IT With Anu - Tutorial #63

Опубликовано: 17 Июнь 2026
на канале: Crack IT with Anu
103
9

In this video tutorial, we will learn about the seek () and tel l() methods in Python file handling.

File Pointer :

When we open a file in python, there is something called a file pointer ( like a cursor).

This pointer tells python where in the file it is currently reading or writing.

By default, the pointer starts at the beginning of the file.

tell() method :

tell() returns the current position of the file pointer in bytes.

tell() just tells you where the pointer is.

Check the practical example of tell() method in python

seek() method :

seek (position) moves the file pointer the the position we give ( in bytes )

If f.seek (0)- It jumps back to the start of the file.
If f.seek(6) - it skips the first 6 characters

Check out the practical example of the seek() method in Python.

#crackITwithanu #seekmethodinpython #tellmethodinpython #filehandlinginpython #filehandling #filehandlingtutorial #tellandseekmethods #pythontutorialinhindi #filehandling #tellmethod #seekmethod #pythonprogramming #learnpython