The Reduce Function in Python 3: Simply Explained

? The reduce() function from Python’s functools module aggregates an iterable to a single element. It repeatedly merges two iterable elements into a single one as defined in the function argument. By repeating this, only a single element will remain — the return value. Minimal Example Here’s the minimal example: The code performs the following steps: … Read more

How to Convert a String List to an Integer List in Python

The most Pythonic way to convert a list of strings to a list of ints is to use the list comprehension [int(x) for x in strings]. It iterates over all elements in the list and converts each list element x to an integer value using the int(x) built-in function. This article shows you the simplest … Read more

How to Convert a String List to a Float List in Python

The most Pythonic way to convert a list of strings to a list of floats is to use the list comprehension floats = [float(x) for x in strings]. It iterates over all elements in the list and converts each list element x to a float value using the float(x) built-in function. This article shows you … Read more

How to Convert an Integer List to a Float List in Python

The most Pythonic way to convert a list of integers ints to a list of floats is to use the list comprehension expression floats = [float(x) for x in ints]. It iterates over all elements in the list ints using list comprehension and converts each list element x to a float value using the float(x) … Read more

How To Sort A Set Of Values?

Summary: This blog explores the steps to sort elements of a Set. Python offers the built-in sorted() function to sort elements in container objects such as a set or a list. For example: sorted({1, 5, 2}) sorts the elements in the set and returns the sorted list [1, 2, 5]. Note: All the solutions provided … Read more

Striving for Collective Intelligence

The idea I’m going to tell you is well-researched but little-known. And it’s meta. Thinking about it has become my main passion, life mission, and purpose. It’s how I see the world. In short: what drives me is increasing collective intelligence. Collective Intelligence is Everywhere You are not one individual but many individual cells that are … Read more

ROT13 in Python – Simply Explained

Rot 13 SimpleExplanation

ROT13 is a simple encryption method. It shifts each character of the clear text string 13 positions forward in the alphabet. This Python one-liner does ROT13 encryption for you: Don’t worry if this seems confusing. We’ll explain it all in detail below! Note: the variable cleartxt refers to the string you want to encode. It … Read more

Writing Clean Code — Being a Professional [Cheat Sheet + Video]

Download the cheat sheet here (direct PDF download): Have you ever asked yourself, “What does it mean to be a professional?” This article is about being a professional software developer. It is based on the book, Clean Code by Robert C. Martin. All quotations are from this book.  While reading this article, you will learn … Read more

What are the Applications of Graphs in Computer Science?

[Reading time: 9 minutes] Graphs are everywhere. They are used in social networks, the world wide web, biological networks, semantic web, product recommendation engines, mapping services, blockchains, and Bitcoin flow analyses. Furthermore, they’re used to define the flow of computation of software programs, to represent communication networks in distributed systems, and to represent data relationships … Read more

Best 15+ Machine Learning Cheat Sheets to Pin to Your Toilet Wall

Toilet Wall Cheat Sheet

This article compiles for you the 15 best cheat sheets in the web that help you get started with machine learning. If you’re short on time, here are the 15 direct PDF links (open in a new tab): Each cheat sheet link points directly to the PDF file. So don’t lose any more time, and … Read more