How to Check if a Variable is an Integer

Problem Formulation and Solution Overview In this article, you’ll learn how to check if a variable is an integer data type in Python. During your career as a Pythonista, you will encounter many times where you need to test if a variable is an integer or not. πŸ’¬ Question: How would we write Python code … Read more

Python Tuple Comprehension Doesn’t Exist – Use This Instead

Python has list comprehension and dictionary comprehension as a concise way to create a list or a dictionary by modifying an existing iterable. Python also has generator expressions that allow you to create an iterable by modifying and potentially filtering each element in another iterable and passing the result in a function, for instance. Does … Read more

Quant Developer — Income and Opportunity

Before we learn about the money, let’s get this question out of the way: What is a Quant Developer? A quantitative developer (i.e., Quant) is a financial programmer focused on financial modeling and quantitative finance and trading. Quants use their profound knowledge of statistics and math, finance, data structures, algorithms, machine learning, scientific computing, data … Read more

Switch German and English Keyboard Layouts (Windows)

English/US keyboards are QWERTY keyboards, again named after the first six letters on the keyboard. Here’s a screenshot of an English/US “QWERTY” keyboard layout: German/European keyboards are QWERTZ keyboards, named after the first six letters on the keyboard. Here’s a screenshot of a German “QWERTZ” keyboard layout: πŸ’¬ Question: How to switch between German and … Read more

How to Overwrite the Previous Print to Stdout in Python?

Summary: The most straightforward way to overwrite the previous print to stdout is to set the carriage return (‘\r’) character within the print statement as print(string, end = “\r”). This returns the next stdout line to the beginning of the line without proceeding to the next line. Problem Formulation Problem Definition: How will you overwrite … Read more

np.zeros() — A Simple Illustrated Guide

In Python, the numpy.zeros() function returns a new array of given shape and type, filled with zeros.Β  Here is the parameter table of numpy.zeros(). If it sounds great to you, please continue reading, and you will fully understand the numpy.zeros() function through Python code snippets and vivid visualization. Concretely, I will introduce its syntax and … Read more