Unix Heros: Celebrating 8 Pioneers to Change Computing Forever

The family of Unix operating systems emerged in the late 1970s when Bell Systems made the source code of its technology open to the public. In the subsequent decades, universities, individuals, and corporations developed a multitude of extensions and new versions. Today, Unix is a trademarked standard that ensures that certain quality standards are met … Read more

Python String Concatenation Without ‘+’

When I first saw this, I was sure it’s a bug. Well—it’s a feature! In today’s short article, you’ll learn about a small Python trick that I call “string concatenation without +”. Let’s start with some code! Plus vs. Adjacent String Literal Concatenation There are two ways to concatenate string literals in Python: Using the … Read more

How to Reverse/Invert a Dictionary Mapping

In Python, a dictionary is an implementation of a data structure known most commonly as an associative array. This collection of key-values pairs maps the key to the associated value that can be implemented in many ways from knowing the price of apples and peas to put into the grocery store app that is used … Read more

Python chr() Function

The Python chr() function takes one number as argument that is the specified Unicode and returns the character associated to this Unicode argument. For example, the call chr(101) returns the Unicode character ‘e’. The allowed range of arguments are all integers between 0 and 1,114,111 (included)—integers outside this interval will raise a ValueError. Here are … Read more

String Concatenation – An Interactive Guide

Python has powerful built-in capabilities for string manipulation. That’s why web companies like Google love Python—it’s a perfect fit for the text-based web. This guide shows you how to use string concatenation operators using multiple forms of education: Text Puzzle Video Exercise Ready to learn string concatenation? Let’s get started! A Textual Introduction to String … Read more

Python Slicing Bootscamp

Slicing is one of the most popular Python features. Thus, understanding slicing is key to understand existing code bases. In this tutorial, I’m going to train your slicing skills. Ready? So, let’s go! ? Watch the Video Python Slicing Read About Slicing Slicing is a Python-specific concept for accessing a range of values in sequence … Read more

Python sorted() Function

If you work in a data driven career, odds are you will at some point have to perform sorting on your data. Rather than writing your own sorting algorithm (which will most likely be far less efficient), Python provides a built-in function called sorted(). This function allows you to do basic sorting, such as arranging … Read more

Regex Special Characters – Examples in Python Re

Regular expressions are a strange animal. Many students find them difficult to understand – do you? I realized that a major reason for this is simply that they don’t understand the special regex characters. To put it differently: understand the special characters and everything else in the regex space will come much easier to you. … Read more

Python callable() Function

Python’s built-in callable(object) returns True if you could call the object argument like a function with the trailing parentheses in object(). You can make any object callable by implementing the instance’s __call__() method. For example, callable(callable) returns True because callable is a function object. But callable(3) returns False because an integer is not a function … Read more

Python bytes() Function

Python’s built-in bytes(source) function creates an immutable bytes object initialized as defined in the function argument source. A bytes object is like a string but it uses only byte characters consisting of a sequence of 8-bit integers in the range 0<=x<256. The returned byte object is immutable—you cannot change it after creation. If you plan … Read more