Chapter 1
Working with External Files
IN THIS CHAPTER
Understanding text and binary files
Opening and closing files
Reading a file's contents
Looping through a file
Reading and copying binary files
Conquering with CSV files
From CSV to dictionaries and objects
Pretty much everything that’s stored in your computer, be it a document, program, movie, photograph … whatever, is stored in a file. Most files are organized info folders (also called directories). On a Mac you can use Finder to browse around through folders and files. In Windows you use File Explorer or Windows Explorer (but not Internet Explorer) to browse around through folders and files.
Python offers many tools for creating, reading from, and writing to many different kinds of files. In this chapter, you learn all the most ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access