Computer Science

Which of the following format of files can be created programmatically through Python to store some data ?

  1. Data files
  2. Text files
  3. Video files
  4. Binary files

Python File Handling

3 Likes

Answer

Text files, Binary files

Reason —

  1. Text files — Text files are one of the most common formats for storing data. They contain human-readable text and can be created and manipulated using Python's built-in file handling functions like open(), write() etc.

  2. Binary files — Binary files store data in a binary format, which means they contain sequences of bytes that may represent any type of data, including text, images, audio, or any other type of information. Python provides facilities for working with binary files through modes like 'rb' (read binary) and 'wb' (write binary).

Answered By

1 Like


Related Questions