Computer Science
Which of the following format of files can be created programmatically through Python to store some data ?
- Data files
- Text files
- Video files
- Binary files
Python File Handling
3 Likes
Answer
Text files, Binary files
Reason —
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.
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
What is the full form of :
- CSV
- TSV
Information stored on a storage device with a specific name is called a ……………
- array
- dictionary
- file
- tuple
To open a file c:\ss.txt for appending data, we use
- file = open("c:\\ss.txt", "a")
- file = open("c:\\ss.txt", "rw")
- file = open(r"c:\ss.txt", "a")
- file = open(file = "c:\ss.txt", "w")
- file = open(file = "c:\ss.txt", "w")
- file = open("c:\res.txt")
To read the next line of the file from a file object infi, we use
- infi.read(all)
- infi.read()
- infi.readline()
- infi.readlines()