The Python Standard Library
Explore built-in modules: os, sys, math, random, datetime.
Introduction
Python ships with a vast standard library of modules covering file I/O, math, dates, random numbers, OS interaction, and more.
os Module
import os provides OS interaction: os.getcwd(), os.listdir(), os.environ, os.makedirs(), os.remove().
import os
print(os.getcwd())
print(list(os.environ)[:3])All lessons in this course
- Creating and Importing Modules
- The Python Standard Library
- Packages and __init__.py
- Installing Packages with pip