Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Python Library Examples
Logo
Python Library Examples
  • How to calculate a square root?
  • How to calculate a trigonometric function?
  • How to calculate an exponential function?
  • How to calculate a logarithm?
  • How to generate random numbers?
  • How to flatten a list of lists?
  • How to put a list in random order?
  • How to pick a random sample?
  • How to search text with Regular Expressions?
  • How to find the most similar string?
  • How to calculate a simple sentiment score for a text?
  • How to draw a word cloud?
  • How to format the current time as a string?
  • How to use a datetime object?
  • How to let a program wait for a while?
  • How to check whether a file exists?
  • How to copy or remove a file?
  • How to loop over all files in a directory?
  • How to run a command-line program from Python?
  • How to write a JSON file?
  • How to read a JSON file?
  • How to read a XML file?
  • How to write a XML file?
  • How to create a zip archive?
  • How to read a zip archive?
  • How to read a Word Document?
  • How to write a Word Document?
  • How to merge multiple PDFs into one?
  • How to merge multiple images into a PDF
  • How to plot a bar chart?
  • How to draw a scatterplot?
  • How to draw a line plot?
  • How to draw error bars?
  • How to draw a pie chart?
  • How to draw a map?
  • How to plot a graph?
  • How to shrink an image?
  • How to create an image from scratch?
  • How to mix color channels?
  • How to create turtle graphics?
  • How to draw a fractal image?
  • How to divide a panda image into hexagons?
  • How to optimize parameters of a function?
  • How to train a machine learning model?
  • How to optimize a linear problem?
  • How to connect Python to MongoDB?
  • How to store data in a SQLite database?
  • How to download a web page?
  • How to submit a HTTP GET request?
  • How to parse a HTML page?
  • How to test web pages?
  • How to send an e-mail?
  • How to create a progress bar on the console?
  • How to create a graphical desktop window?
  • How to create a 2D game in the terminal?
  • How to find out where the interpreter is looking for importable modules?
  • How to call a Python program with command-line parameters?
  • How to terminate a Python program gracefully?
Back to top
Copyright © 2025, Kristian Rother
Made with Sphinx and @pradyunsg's Furo