KnowledgeBoat Logo

Computer Science

Which of the following functions do you use to write data in the binary format ?

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

Python File Handling

3 Likes

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