KnowledgeBoat Logo

Computer Science

Which of the following functions is used to write data in the binary mode?

  1. write
  2. output
  3. dump
  4. send

Python Data Handling

1 Like

Answer

dump

Reason — To write an object on to a binary file opened in the write mode, we should use dump() function of pickle module as per following syntax: pickle.dump(<object-to-be-written>, <file-handle-of-open-file>).

Answered By

1 Like


Related Questions