0% found this document useful (0 votes)
3 views

Types of Files in Python

The document outlines two main types of files in Python: Text Files and Binary Files. Text Files contain alphabets, digits, and special symbols, while Binary Files store data in binary format, such as images and audio files. Python treats files as Text Files by default, denoted by 't', whereas Binary Files are denoted by 'b'.

Uploaded by

Godspell
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Types of Files in Python

The document outlines two main types of files in Python: Text Files and Binary Files. Text Files contain alphabets, digits, and special symbols, while Binary Files store data in binary format, such as images and audio files. Python treats files as Text Files by default, denoted by 't', whereas Binary Files are denoted by 'b'.

Uploaded by

Godspell
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

===============================================

Types of Files in Python


===============================================
=>In any Programming lang, we have Two Types of Files. They are

1. Text Files
2. Binary Files
-----------------------------------------------------------------------------------
-----------------------------------------------------------------
1. Text File
-----------------------------------------------------------------------------------
------------------------------------------------------------------
=>A Text File is One, which always contains alphabets, Digits and Special Symbols.
=>Text Files are denoted by a letter "t".
=>By deafult Python Programming Lang Treats every file as Text File.
Examples: .py .java .cpp .c
.txt .xlsx, .doc...etc
-----------------------------------------------------------------------------------
-------------------------------------------------------------------
2. Binary File
-----------------------------------------------------------------------------------
-------------------------------------------------------------------
=>A Binary File is One, which contains the data in the form of Binary Format
(Pixels).
=>Binary Files are denoted by a letter "b".
----------------------
=>Examples
----------------------
=> Images (.png, .jpeg,jpg, .gif....etc)
=> Audio and Video Files (.mvi, .avi...etc)
=> PDF File Images
===================================================================================
=

You might also like