Generators in PythonAll new Python programmers stumble upon generators at some point. This is one of the more complex topics in Python. In this article, I will explain what generators are, where they are used, and, most importantly, how to use them. A brief lecture abou...Jul 13, 2024·13 min read
Writing elegant code with map, filter, and reduce in PythonIntroduction One of the first things we learn in programming is how to use for loops - they are a vital concept to grasp early on. However, there are ways to achieve the same thing, using a lot less code. With Python being a multi-paradigm language, ...Sep 30, 2021·7 min read
Calculating 30000 Pi digits in 10 seconds using multi-threaded programmingPhoto by Lyuboslav Karev One way is to use the Ramanujan–Sato series, which can give a close approximation of the number pi: Ramanujan-Sato series A simple program Prerequisites Although I’ve tried to keep this article simple to understand, this art...Aug 8, 2021·9 min read