Tutorials

Looking for a more structured way to get started with Python? Check out the “Start Here” Page!

Most Recent Blog Posts

Firebase Auth FastAPI Header

Python Firebase Authentication Integration with FastAPI

FastAPI is a new Python framework to facilitate the creation of APIs. Google Firebase Authentication is Google Cloud Platform’s authentication tool. It’s similar to tools like AWS Cognito, Azure Active Directory, or Okta.  In this post, we’re going to go over how to integrate Firebase Auth with FastAPI. We’ll cover: What is the Python FastAPI […]

How to Use Environment Variables with Python Dotenv

We often have to use API keys, secret keys, identity keys, and so on when we build applications. Each of these keys comes with a warning not to show it publicly or to lose it. Managing these keys is not only a safety concern, but also a matter of staying up to date as keys […]

Accuracy, Precision, Recall, and F Score

How do you measure how well your machine learning model is doing? There are four main metrics for measuring the accuracy of a machine learning model. These metrics are accuracy, precision, recall, and F-Score (or F Score). In this post, we’ll be covering how to calculate each of these metrics and what they’re used for. […]

How to Make a 4×4 Magic Square in Python

Magic Squares are one of the oldest recreational mathematics games. The smallest magic squares are three by three, but they can be made up to any size with the right formulas. Odd and even ordered magic squares have different formulas, but can be easily generated. Programming has made it even easier to make magic squares, […]

Prim’s Algorithm in Python

Minimum Spanning Tree (MST) algorithms find the shortest path that connects all the points in a graph. Tree algorithms that find minimum spanning trees are useful in network design, taxonomies, or cluster analysis. On PythonAlgos, we’ve already covered one MST algorithm, Kruskal’s algorithm. This time we’re going to cover Prim’s algorithm for an MST. Prim’s […]

Slicing Python Strings: A Complete Guide

Python comes with a string slicing system that is a Swiss army knife of functionality. Bracket notation allows us to slice Python strings to get one or more characters in order or in reverse. In this complete guide on slicing Python strings we’ll cover: Slicing a Single Character from a Python String Using a Negative […]

Graph Algorithms: Kruskal’s Algorithm in Python

Data structures and algorithms are a cornerstone of computer science. In our journey so far, we’ve looked at basic data structures like stacks, queues, and dequeues, linked lists and binary trees, and algorithms like sorting algorithms, tree algorithms, and Dijsktra’s algorithm. Now, let’s take a look at another important graph algorithm – Kruskal’s. Kruskal’s algorithm […]

Graph Algorithms: Floyd Warshall in Python

Data structures and algorithms are a cornerstone of computer science. In our journey so far, we’ve looked at basic data structures like stacks, queues, and dequeues, linked lists and binary trees, and algorithms like sorting algorithms, tree algorithms, and Dijsktra’s algorithm. Now, let’s take a look at another important graph algorithm – Floyd Warshall. In […]

Nested Lists in Python

Nested lists are Python representations of two dimensional arrays. They are used to represent lists of lists. For example, a list of grocery lists for the month or matrices we can multiply. In this post we’re going to go over how to use Python to create and manipulate nested lists. We’ll go over: Python Nested […]

Level 1 Python: Pure Python Matrix Multiplication

Level 1 Python projects are projects that are more logically complex or require more libraries than the ones in the Super Simple Python series. Pure Python matrix multiplication is one of the projects that is more logically complex, we won’t be using any external libraries here. Most of these projects should take you between 30 […]

Loading…

Something went wrong. Please refresh the page and/or try again.


Follow My Blog

Get new content delivered directly to your inbox.