Python Standard Library Tutorials


Explore Python's standard library, modules such as os, json, re, ftplib, imaplib, threading, pickle, socket, random, secrets and many more.

How to Use the Argparse Module in Python
How to Use the Argparse Module in Python

Master the argparse module in Python with this comprehensive tutorial, covering command-line applications, argument parsing, real-world examples, integration with other libraries, and best practices to create user-friendly interfaces and powerful command-line tools.

How to Make a Hangman Game in Python
How to Make a Hangman Game in Python

Learn how to make a hangman game to guess a word in Python using the standard library.

How to Print Variable Name and Value in Python
How to Print Variable Name and Value in Python

Learn the best way to print variable name and value in Python using F-strings.

How to Split a String In Python
How to Split a String In Python

Learn how you can split text in Python using the .split() str method.

How to Organize Files by Extension in Python
How to Organize Files by Extension in Python

Learn how to separate your files by extension in your target folder using Python's built-in libraries.

Daemon Threads in Python
Daemon Threads in Python

Learn what daemon threads are with toy examples as well as real world examples and how to set daemon threads in Python

How to Delete Emails in Python
How to Delete Emails in Python

Learn how you can use IMAP protocol to delete specific mails in your email account in a selected mailbox using the built-in imaplib module in Python.

How to Make a Chat Application in Python
How to Make a Chat Application in Python

Learn how to build a simple chat room application that accepts multiple connected clients using built-in's sockets and threading libraries in Python.

Logging in Python
Logging in Python

Learn how to use Python's built-in logging module to log your Python applications, changing default format, level, and learning in a concrete example, as well as using logging handlers.

How to Use Regular Expressions in Python
How to Use Regular Expressions in Python

Learn how to use Python's built-in re module to use several string matching techniques using functions like match, search, finditer and sub.

How to Work with JSON Files in Python
How to Work with JSON Files in Python

Learn how to save (serialize) and load (deserialize) JSON files in Python using the built-in json module.

How to Download and Upload Files in FTP Server using Python
How to Download and Upload Files in FTP Server using Python

Learn how to use Python's built-in ftplib module to download and upload files in a FTP server using RETR and STOR commands respectively.

How to Read Emails in Python
How to Read Emails in Python

Learn how you can use IMAP protocol to extract, parse and read emails from outlook, aol, office 365 and other email providers as well as downloading attachments using imaplib module in Python.

How to List all Files and Directories in FTP Server using Python
How to List all Files and Directories in FTP Server using Python

Listing all files and directories in an FTP server using LIST, NLST and MLSD FTP commands in Python using the built-in ftplib module.

How to Use Threads for IO Tasks in Python
How to Use Threads for IO Tasks in Python

Using different methods such as thread pool executor or threading module to create and handle threads for speeding up I/O bound tasks in Python.

How to Get the Size of Directories in Python
How to Get the Size of Directories in Python

Calculating the size of a directory in bytes in Python and plotting a pie using matplotlib to see which subdirectory takes most size.