Python Learning
Фотография
нажмите — покажем
нажмите — покажем
The tell() function in Python 🐍
The tell() function returns the current position of the file pointer within the data stream. It is most often used when working with files. 📂
The function does not accept any arguments and returns an integer - the position in bytes from the beginning of the stream. 🔢
with open("file.txt", "rb") as f:
print(f.tell())
3 · 293 ·