Question:

Match List-I with List-II:
List-IList-II
(A) f.seek(-10,1)(I) From beginning of file, move 10 bytes forward
(B) f.seek(10,1)(II) From current position, move 10 bytes backward
(C) f.seek(10)(III) From current position, move 10 bytes forward
(D) f.seek(-10,2)(IV) From end of the file, move 10 bytes backward

Updated On: Nov 4, 2024
  • (A) - (I), (B) - (II), (C) - (III), (D) - (IV)
  • (A) - (II), (B) - (III), (C) - (IV), (D) - (I)
  • (A) - (III), (B) - (II), (C) - (IV), (D) - (I)
  • (A) - (II), (B) - (III), (C) - (I), (D) - (IV)
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

The ‘seek()‘ function in Python’s file handling moves the file pointer based on the reference point specified.
Was this answer helpful?
0
0