From the documentation for python 3. 2 and up:
In text files (those opened without a b in the mode string), only seeks relative to the beginning of the file are allowed (the exception being seeking.
If you are working with files (eg:
With the filestream class) it seems seek (0, seekorigin. begin) is able to keep internal buffer (when possible) while position=0 will always discard it.
If you create the necessary files on your computer, and run this. py file, you will find that sometimes it works as desired, and other times it doesn't.
Can anyone tell me how to seek to.