Top 10 Algorithm Cheat Sheets

Hey Finxters! Do you  know what time it is? That’s right! It’s time for some more cheat sheets!! These cheat sheets are meant to help you on your way to becoming a great Python developer and of course becoming one of the best Python freelancers globally! This article is all about algorithms used in software … Read more

A Recursive Pathfinder Algorithm in Python

A simple and effective way to grow your computer science skills is to master the basics. Knowing the basics sets apart the great coders from the merely intermediate ones. One such basic area in computer science is graph theory, a specific subproblem of which—the pathfinder algorithm—we’ll address in this tutorial. So first things first: What … Read more

PyPubSub – Creating Your First Publish Subscribe App in Python

Did you check the news today, or receive an email newsletter from a company? Both modes of communication follow the publish-subscribe communication pattern. This article will show you how to implement your own PubSub system in Python using the flexible PyPubSub library. If you already know about the PubSub concept, feel free to move to … Read more

How to Switch Keys and Values in a Python Dictionary?

Problem: Given a dictionary in Python; how to switch Keys and Values?  Method 1: Using a for loop   Method 2: Using the zip function Method 3: Using the map and reverse functions Method 4: Using a dictionary comprehension Summary: Use one of the following methods to switch between the keys and values in a dictionary with unique values. … Read more

My Business and Coding Book Recommendations

“Readers are leaders.” Many Finxters seek mentorship—and write in asking me for book recommendations. I read about one business or programming book per week and this simple habit has completely transformed my life. In this article, I’ve compiled my top list of business and programming books—ordered by how great I think the book is. All … Read more

The K-Means Algorithm in Python

Hey Finxters! Today we are going to talk about one of the most popular clustering algorithms: K-Means. Ever wondered how to organize seemingly unstructured data, making sense of unordered objects, in an easy way? For example, you might need to: perform customer segmentation store files based on their text content compress images with your own … Read more

How to Remove Everything After the Last Character in a String?

Problem Formulation Given string s, and character c. How to remove all characters in s after the first occurrence of c? Example Given: – string s = ‘hello world’, and – empty space character c = ‘ ‘. Desired result: ‘hello’ Method 1: string.index() + slicing To remove everything after the first occurrence of character … Read more

MapReduce — A Helpful Illustrated Guide

MapReduce is the name of both (i) a distributed processing programming model provided by the Apache Foundation, and (ii) a functional processing technique. It consists of two steps: the map() function and the reduce() function. Map() converts each element in a data set into a modified element. Reduce() takes subsets of modified elements and aggregates … Read more

How to Split a String Between Numbers and Letters?

Problem Formulation: Given a string of letters and numbers. How to split the string into substrings of either letters or numbers by using the boundary between a letter and a number and vice versa. Examples: Have a look at the following examples of what you want to accomplish. ‘111A222B333C’ —> [‘111’, ‘A’, ‘222’, ‘B’, ‘333’, … Read more

They Use These 15+ Python Interview Questions To Fail You … (And What You Can Do About It)

Fear Your Coding Interview? This article shows you how to make your coding interview a success. General Tips to Prepare Your Interview Watch the following Instagram post and learn about popular Python interview questions (swipe left, swipe right): Sieh dir diesen Beitrag auf Instagram an [CHALLENGE] How many of the three questions can you answer? … Read more

How to Create a Sequence of Evenly Spaced Values [Vanilla Python & Numpy Linspace]

Problem: How to create a sequence of evenly-spaced values Using pure, vanilla Python, and Using NumPy’s linspace() method. Example: Given three arguments: start=10, stop=20, number_of_values=11. How do you create a sequence of 11 values x0, x1, …, x10 where two subsequent values xi and x(i-1) have the same distance for all i in {0, …, … Read more