Computer Science
When do you think text files should be preferred over binary files ?
Python File Handling
8 Likes
Answer
Text files should be preferred over binary files when dealing with human-readable data that does not require special encoding or formatting. They are ideal for storing plain text, such as configuration files, logs, or documents, as they are easily editable and can be viewed using a simple text editor. Text files are also more portable and platform-independent, making them suitable for data interchange between different systems.
Answered By
3 Likes
Related Questions
What role is played by file modes in file operations ? Describe the various file mode constants and their meanings.
What are the advantages of saving data in :
(i) binary form
(ii) text form
(iii) csv files ?
Write a statement in Python to perform the following operations :
(a) To open a text file "BOOK.TXT" in read mode
(b) To open a text file "BOOK.TXT" in write mode
When a file is opened for output in append mode, what happens when
(i) the mentioned file does not exist
(ii) the mentioned file does exist.