Computer Science
If the offset value is set to 2, beginning of the file would be taken as seek position.
Python Data Handling
2 Likes
Answer
False
Reason — If the offset value is set to 2, end of the file would be taken as seek position.
Answered By
2 Likes
Related Questions
tell() method of Python tells us the current position within the file.
The offset argument to seek() method indicates the number of bytes to be moved.
To open a file c:\test.txt for reading, we should give the statement:
- file1= open("c:\ test.txt", "r")
- file1 = open("c:\\ test.txt", "r")
- file1 = open(file = "c:\ test.txt", "r")
- file1 = open(file = "c:\\s test.txt", "r")
To open a file c:\test.txt for writing, we should use the statement:
- fobj = open("c:\test.txt", "w")
- fobj = open("c:\\test.txt", "w")
- fobj = open(file = "c:\test.txt", "w")
- fobj = open(file = "c:\\test.txt", "w")