Previously, we worked with files, but in a superficial level, meaning we perform an operations such
as changing file names and extensions, deleting and copying files, cetera.
So actions which did not involve looking inside the files, we did not read or manipulate the contents
of the files.
So we're going to do that in this section.
We're going to load the contents of the files, change the content.
We're going to read the files.
But let's be clear about one thing.
First, there are two major file types.
Binary and non-binary files.
Non-binary files are text files, and we're going to work on non-binary files.
So text files in this section.
Text files are all files that can be viewed through a text editor.
For example, the text files that HTML that see us v that puoi files as well.
All these are examples of text files.
You can just open these files with a text editor, such as notepads or by charm, et cetera, and you
can see the contents of these files and the content is always text.
And of course, you can also edit the content.
So, for example, that's profiles.
All we have is text.
In contrast, binary files are files such as that jpg that zip that and before, and even that PDF and
Doc X files.
These are examples of binary files.
Any file that has information other than text as a binary file?
Yes, PDF and doc docs contain text, but they also contain other information, such as the phone style
and the size of the text.
Sometimes they contain pictures or other media files embedded in the documents in the file.
On the other hand, text files contain text and only text, and you can load that text in Python as
a shrink and then manipulate the string and perhaps write the contents back to the file so you are changing
the contents of the file.
Of course, it is also possible to manipulate binary files such as PDF or JPEG files.
But for those files, we need specific Python libraries designed to manipulate a particular file type,
such as the JPEG.
And there are sections in the course that cover the processing of PDF files.
So we have sections on PDF files.
We have sections on image processing, processing, word documents, etc. But in this section, we focus
exclusively on non-binary files.
So text files, let us get started and I'll talk to you in the next video you.