The open() function is essential for working with files in Python. The filename and mode parameters are passed to the open() function. There are four different ways to open a file (modes): "r" stands for Read and is the default setting. Opens a file for reading; if the file does not exist, an error is returned.
r for reading – The file pointer is placed at the beginning of the file.
r+ Allows you to read and write to a file.
w Only allows you to write to a file.
w+ Allows you to write and read a file.
rb Opens a file in binary format for reading only.
Files are used to permanently store data on a storage device. File handling is a mechanism for storing a program's output in a file and performing different operations on it. A stream is a type of abstraction that describes a device that performs input and output actions.
Learner's Ratings
4.5
Overall Rating
73%
18%
0%
9%
0%
Reviews
S
Subash Chandru
5
excellent teaching
S
Sneka Sneka
5
Good
3
31_NITHIYANANTHAM. P
5
Its super
4
41. Bhusnar Sajan
5
it is not learn english
P
Periyasamy M
5
Good
A
Antony Aswathi.N
4
Good
R
Rakesh Bhat
5
Nice Tutorial
M
MOHAN RAJ . J
4
wonderful the section
I
Inaamul Hasan
5
It's just awesome. we can able to learn as well as we can test by ourself at the end of one section!!!
Prashant
5
Nice Course
Show More
Recommended Courses
The Complete JavaScript Course - Beginner to Advance
Share a personalized message with your friends.