You must have noticed that till now we have been learning one new concept per tutorial. For some important concepts like loops we had to allocate two tutorials so we can grasp the concept of both loops (for and while) separately. But now in the case of the file, we have allocated the next five tutorials (excluding the exercise and their solutions). So, from this, you can take a hint that how important file handling is in programming.
In this tutorial we are not getting into files in detail, instead, we are discussing the basics of the file and its modes in a theoretical manner. In computer terms, “a file is a resource for saving data and information in computer hardware”. A file is stored in the form of bytes in hardware. A file is opened in the RAM, but it is stored in the hardware because the hardware is non-volatile i.e. it stores its data permanently. On the other hand, RAM is volatile, it loses its data when the system is shut down.
Unlike C or C++, file handling in python is relatively easy and simple. Python treats files differently as text or binary and this is important. There are two types of files that we normally encounter in our computer daily. The first one is a text file and the second one is a binary file. We can understand by the name of the text file that it must contain text in it. The extension for the text file is .txt. All other forms of files are mostly binary even a .doc file, that we open in Microsoft Word is a binary file because it requires special software for accessing it.
The second sort of files are binary files. They are almost all the other files that we come in contact with while using our computer. These files include images, PDFs, Excel files, etc.
There are many modes of opening a file in Python, unlike other languages Python has provided its users a variety of options. We will discuss seven of them in this tutorial.
Harry bhai plz is vedio ki coding (Code file as described in the video) paste kar dijiye
Sir there is no code present here Is it my browser's error or you haven't updated the website yet If not please update kar do sir We really need the source code
hello harry bhai the code given by you does not match the code mentioned in the video plz help!!!
Sir Please Update the codes on your website
code for this video (follow me on insta: 7shekhar7 ) #files IO basics """ "r" = open file for reading - default mode "w" = open file for writing "x" = creates file if not exist "a" = add more content to a file like append "t" = text mode "b" = binary mode "+" = write and read mode """
Thanks, Harry Bhai for Awesome Tutorials |:::::::::::::::::| Full Notes and Source Code :::::::::::::} https://github.com/Optimized-World/Complete-Python-Tutorial-and-Notes
To read the Docstring function we will use the function .(__doc__) like : print(function1.__doc__)
No downloadable resources for this video. If you think you need anything, please post it in the QnA!
Any Course related announcements will be posted here