Chapter 3. Interacting with the world


This chapter covers
  • What libraries are
  • How to use libraries, including Python’s standard library
  • An example program that uses Python’s os and sys libraries
  • Python’s dictionary data type


One of the key strengths of Python is its standard library. Installed along with Python, the standard library is a large suite of program code that covers common tasks like finding and iterating over files, handling user input, downloading and parsing pages from the web, and accessing databases. If you make good use of the standard library, you can often write programs in a fraction of the time that it would take you otherwise, with less typing and far fewer bugs.


Guido’s Time Machine

The standard library is so ...

Get Hello! Python now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.