In this video, we explain the tell() and seek() functions in Python with simple examples and clear visuals!
📂 These functions are used in file handling to manage the file pointer — the position where Python reads or writes in a file.
---
✨ Topics Covered:
What is tell() in Python?
How to use seek() to move the file pointer
Real-life example to make it easy
Practical code demo for students
---
🧠 Useful for:
2nd PUC Computer Science students
Beginners learning Python file handling
Anyone preparing for CBSE/PU Board exams
---
📘 Sample Code from the Video:
f = open("demo.txt", "r")
print("Current Position:", f.tell()) # Outputs the position
f.seek(5) # Moves to byte 6
print("Data from 6th byte:", f.read())
f.close()
---
📚 Don’t forget to Like 👍, Share 📤, and Subscribe 🔔 for more Python tutorials!
💬 Comment below if you have any questions or doubts.
---