1. The seek() method returns the current position of the file object.
A) True
B) False
Correct Answer: False
2. Which statement will read 5 characters from a file(file object ‘f’)?
A) f.read()
B) f.read(5)
C) f.reads(5)
D) None of the above
Correct Answer: f.read(5)
3. Which function open file in python?
A) opens( )
B) open( )
C) Open( )
D) None of the above
Correct Answer: open( )
Explanation : open( ) function open file in python.
4. CSV stands for
A) comma string values
B) comma sequence values
C) comma separated values
D) comma segregated values
Correct Answer: comma separated values
Explanation : CSV stands for comma separated values.
5. Which of the following option is true? fp.seek(10, 1)
A) Move file pointer ten characters behind from the current position.
B) Move file pointer ten characters ahead from the beginning of a file
C) Move file pointer ten characters behind ahead from the end of a file.
D) Move file pointer ten characters ahead from the current position.
Correct Answer: Move file pointer ten characters ahead from the current position.
Explanation : seek(): Sets the file’s current position.