Skip to main contentSkip to solution

Match List-I with List-II

List-IList-II
(A) tell()(I) used to position the file object at a particular position
(B) seek()(II) used for pickling python object to a binary file
(C) load()(III) returns an integer which specifies the current position of the file object in the file
(D) dump()(IV) used for unpicking data from a binary file

Solution

✅ Correct Option: 3
List IList II
(A) tell()(III) returns an integer which specifies the current position of the file object in the file
(B) seek()(I) used to position the file object at a particular position
(C) load()(IV) used for unpickling data from a binary file
(D) dump()(II) used for pickling a Python object to a binary file

Easily confused pairs: load() and dump() are not interchangeable. dump() writes (pickles) an object into the file, and load() reads (unpickles) it back.

Memory trick: tell() tells you where you are, and seek() seeks (moves to) a position.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question