Skip to Content
Python Workout
book

Python Workout

by Reuven M. Lerner
July 2020
Beginner to intermediate
248 pages
6h 58m
English
Manning Publications
Content preview from Python Workout

5 Files

Files are an indispensable part of the world of computers, and thus of programming. We read data from files, and write to files. Even when something isn’t really a file--such as a network connection--we try to use an interface similar to files because they’re so familiar.

To normal, everyday users, there are different types of files--Word, Excel, PowerPoint, and PDF, among others. To programmers, things are both simpler and more complicated. They’re simpler in that we see files as data structures to which we can write strings, and from which we can read strings. But files are also more complicated, in that when we read the string into memory, we might need to parse it into a data structure.

Working with files is one of the easiest and ...

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.
Start your free trial

You might also like

Python for Programmers

Python for Programmers

Paul Deitel, Harvey Deitel
Python One-Liners

Python One-Liners

Christian Mayer

Publisher Resources

ISBN: 9781617295508Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link