199 followers
Machine Learning Engineer - Technical Writer-ish - Interested in Software Testing, Best Practices, Scalability, and Python.
Subscribe to my newsletter and never miss my upcoming articles
In this post, we’ll see how we can flatten a list in 5 different ways. Each method has pros and cons, and varied performance. By the end of this tutorial, I hope you’ll be able to identify the most appropriate solution for your problem. The Python ve...
In the first post of this series, I'll talk about Design Patterns that make sense in Python. We'll see how to implement them and how they are used in the standard library and other third-party packages. In this post, we'll go over the Simple Factory ...
In this post, I’m going to show what I do to map a function that expects multiple arguments. The solutions work not only for the regular map function, you can also use the trick to pass multiple parameters to concurrent.futures.Executor.map and multi...
In this post, we'll see how we can use fixtures as arguments of pytest.mark.parametrize. This is a long-wanted feature that dates back to 2013. Even though pytest doesn't support it yet, you'll see that we can actually make it happen. Problem Suppose...
In this tutorial, you'll learn how to use datetime.timedelta to perform date arithmetic. With timedelta you can add days, minutes, seconds, hours, weeks and many more to a datetime.date or a datetime.datetime object. Table of Contents Adding Seconds...
In this post, I'll show you what I consider the most important bits about Python's f-strings. You will learn several different ways to format a string using f-strings, completely guided by examples. In total, you'll see 73 examples on how to make the...