Qus : What is the use of seek() method in files?
Qusफाइलों में seek() फंक्शन का क्या उपयोग है?
A. sets the file's current position at the offset B. sets the file's previous position at the offset
C. sets the file's current position within the file D. None of these
Solution
A. sets the file's current position at the offset
Explanation
In Python, the seek() method is used to change the current file position or cursor position within a file. The file position is the position where the next read or write operation will occur. The seek() method allows you to move the cursor to a specified offset within the file.