๐ Python Standard Library
The Python Standard Library is a collection of pre-written modules and functions that come with Python.
You can use them without installing any external package.
๐ฆ Common Standard Library Modules
Module | Purpose | Example |
|---|---|---|
| Mathematical operations |
|
| Generate random values |
|
| Date and time |
|
| Operating system operations |
|
| Python/system information |
|
| Work with JSON data |
|
| Regular expressions |
|
| Specialized data structures |
|
| Statistical calculations |
|
| Functional programming tools |
|
๐น Example
import math
print(math.sqrt(16)) #4.0No installation is required because math is part of Python's Standard Library.
For example:
import math # โ
Standard LibraryWhereas libraries such as numpy or pandas generally need to be installed separately.
๐ง Remember
Standard Library = A collection of ready-to-use tools that comes with Python.