Check out a free preview of the full Intermediate Python course:
The "Libraries & Modules" Lesson is part of the full, Intermediate Python course featured in this preview video. Here's what you'd learn in this lesson:

Nina explains how the "batteries included" way of having much functionality already included in the standard library helped Python's early success. An introduction to what's available in the standard library is also covered, as well as its drawbacks.

Get Unlimited Access Now

Transcript from the "Libraries & Modules" Lesson

>> Nina Zakharenko: We're going to talk about libraries and modules. So I've been using a few modules here and there. You've seen me import a few things, datetime, random. There was a library that helped me do a live reloading of my modules. And that's just the thing about Python, the language was designed to be batteries included.

[00:00:20] It has a rich and versatile standard library, which is immediately available. I didn't have to download or install anything external, it just comes with the interpreter. And many people believe that this has given the Python language a head start in a lot of cases. It's really helped vault Python to be the popular tool that it is today.

[00:00:49] So let's take a look at some of those helpful packages in the standard library. One of the downsides of the standard library is that,
>> Nina Zakharenko: It's really optimized for having a rich feature set, and it's also optimized for backwards compatibility. So as the Python language grows, for the most part they try to maintain as much backwards compatibility as possible.

[00:01:21] That means that a lot of libraries included are a little bit hard to use, but it's really easy to install external libraries as well.
>> Nina Zakharenko: Some of the commonly used features of the standard library. sys, S-Y-S, that provides system-specific parameters and functions. OS has a lot of methods available for working with the operating system interface.

[00:01:49] And there's a great os.path submodule that helps us handle files on the file path. math gives us a lot of advanced math functions. And json is an easy-to-use json parser and encoder. Python even gives you a lot of other built-in libraries like database access, logging, Internet protocols, multimedia, there's a debugger, and there are libraries for extending Python itself.

[00:02:24] Later, after this class, you can look at this link for the full list of standard libraries and you'll see this guide from So the language library. It'll show you all of the, let me me bump up the font size there. It'll show you everything that's available on the standard library, so a very quick tour.

[00:02:48] And as you can see, there's a lot of stuff here.
>> Nina Zakharenko: So, I mean, you can see there's a quite a bit more to scroll through, but,
>> Nina Zakharenko: If you're not sure if something is included with the Python language, this is a good place to look.