Summary
We've covered string manipulation, file IO, and object serialization. We discussed how to combine hard-coded strings and program variables into outputtable strings using the powerful string formatting system, and learned the difference between binary and textual data. All told, we've seen:
- How to use the various
strmethods - String formatting
bytesversusstr- Mutable
bytearrays - Files in binary and textual formatters
- Context managers and the
withstatement - Serializing data with
pickleandjson
In the next chapter, we'll cover one of the most important topics in Python programming: how to test our code to ensure it's doing what we think it is doing.