Advertisements
Advertisements
प्रश्न
Differentiate between text file and binary file.
अंतर स्पष्ट करें
Advertisements
उत्तर
Text File:
A text file contains only textual information consisting of alphabets, numbers and other extensions like .txt, .py, .c, .csv, .html, etc. Each byte of a text file represents a character.
Each line of a text file is stored as a sequence of ASCII equivalent of the characters and is terminated by a special character, called the End of Line (EOL).
Binary File:
Binary file consists of data stored as a stream of bytes i.e. as it is stored in computer memory (binary language). No translation occurs in binary file. In binary file no end of line translation. Faster than text file.
shaalaa.com
Types of Files in Python
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
