May 2019
Beginner
528 pages
29h 51m
English
In this chapter you’ll:
Understand the notions of files and persistent data.
Read, write and update files.
Read and write CSV files, a common format for machine-learning datasets.
Serialize objects into the JSON data-interchange format—commonly used to transmit over the Internet—and deserialize JSON into objects.
Use the with statement to ensure that resources are properly released, avoiding “resource leaks.”
Use the try statement to delimit code in which exceptions may occur and handle those exceptions with associated except clauses.
Use the try statement’s else clause to execute code when no exceptions occur in the try suite.
Use the try statement’s finally clause to execute code regardless of whether an ...
Read now
Unlock full access