Computer Science
What happens if no arguments are passed to the seek() method?
- file position is set to the start of file
- file position is set to the end of file
- file position remains unchanged
- results in an error
Python Data Handling
2 Likes
Answer
results in an error
Reason — If no arguments are passed to the seek() method in Python, it will result in an error because the method expects at least one argument to specify the new position within the file.
Answered By
1 Like
Related Questions
Which of the following modes is used for both writing and reading from a binary file?
- wb+
- w
- wb
- w+
Which statement is used to retrieve the current position within the file?
- fp.seek()
- fp.tell()
- fp.loc
- fp.pos
Which of the following mode will refer to binary data ?
- r
- w
- +
- b
Every record in a CSV file is stored in reader object in the form of a list using which method?
- writer()
- append()
- reader()
- list()