Notes to File Away
In this chapter, you learned the following:
-
When files are opened and read, their contents are commonly stored in lists of strings.
-
Data stored in files is usually formatted in one of a small number of ways, from one value per line to multiline records with explicit end-of-record markers. Each format can be processed in a stereotypical way.
-
Data processing programs should be broken into input, processing, and output stages so that each can be reused independently.
-
Files can be read (content retrieved), written to (content replaced), and added to (new content appended). When a file is opened in writing mode and it doesn’t exist, a new file is created.
-
Data files come in many different formats, so custom code is often ...
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