- [Instructor] Just a quick overview of some file concepts
before we begin.
In Python, it views a text file
simply as a sequence of characters,
and the first position in the file
is the character at position zero,
so it's kind of like indexing through a list, for example.
Python also does support binary files,
which are simply sequences of bytes,
and the first byte in the file would be at position zero,
and you might use binary files, for example,
for things like images or videos.
And there are some standard file objects
that are pre-defined for you if you need them.
You can access them
through the Python standard library's sys module.
We have sys.stdin for the standard input stream,
and even though it's referred to as a file object,
by default, the standard input stream reads input
from the command line, although you can redirect it
to get input, for example, from a file.
And then separately, the standard output stream
and the standard error streams
are going to display information
at the command line by default,
but again, those also can be redirected.