226 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, you'll learn how to generate a random string in python in two different ways. Some of these will only work on Python 3.6+. Generating a Random String With Upper Case, Lower Case, Digits and Punctuation The string module comes with a nic...
In this post, you will learn how to sort a dictionary in reverse order by value. Say that you have the following dictionary containing your grades associated with a subject. You want to sort the grades in a descending order - the highest grade will a...
In this article you'll learn how to determine if a string is a valid URL or not. Using django's URLValidator django is a great web framework that has many features. It bundles several utilities that makes web development easier. One such utility is t...
Python provides two different ways to get the current working directory. The first method uses the os module and the second uses pathlib. Using the os Module to Get the Current Directory First thing you need to do is to import the module. >>> import ...
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 ...