The Python Standard Library
React Masterclass
Launching on November 4th
Python exposes a lot of built-in functionality through its standard library.
The standard library is a huge collection of all sort of utilities, ranging from math utilities to debugging to creating graphical user interfaces.
You can find the full list of standard library modules here: https://docs.python.org/3/library/index.html
Some of the important modules are:
mathfor math utilitiesrefor regular expressionsjsonto work with JSONdatetimeto work with datessqlite3to use SQLiteosfor Operating System utilitiesrandomfor random number generationstatisticsfor statistics utilitiesrequeststo perform HTTP network requestshttpto create HTTP serversurllibto manage URLs
Let’s introduce how to use a module of the standard library. You already know how to use modules you create, importing from other files in the program folder.
Well that’s the same with modules provided by the standard library:
import math
math.sqrt(4) # 2.0
or
from math import sqrt
sqrt(4) # 2.0
We’ll soon explore the most important modules individually to understand what we can do with them.
I wrote 20 books to help you become a better developer:
- JavaScript Handbook
- TypeScript Handbook
- CSS Handbook
- Node.js Handbook
- Astro Handbook
- HTML Handbook
- Next.js Pages Router Handbook
- Alpine.js Handbook
- HTMX Handbook
- React Handbook
- SQL Handbook
- Git Cheat Sheet
- Laravel Handbook
- Express Handbook
- Swift Handbook
- Go Handbook
- PHP Handbook
- Python Handbook
- Linux/Mac CLI Commands Handbook
- C Handbook