Python: How to define a regex-matched string type hint
Overview Type hinting in Python has evolved significantly over the years, providing developers with increased clarity and enabling improved code analysis and error detection capabilities. Python 3.5 introduced…
Python: Using Faker to generate i18n random text
Introduction In this tutorial, we will dive deep into how to use Faker, a Python library, to generate internationalized (i18n) random text. Faker is a powerful tool for…
Python + Faker: How to Set Min/Max Length for Random Text
Overview In the world of testing or data anonymization, generating random data is an everyday necessity. Python, with the Faker library, encompasses an incredibly versatile set of tools…
Python: Crawling HTML tables and save to CSV files
Introduction Web scraping is an invaluable skill in the vast domain of data science and analysis. In today’s digital world, a significant amount of data is stored in…
Creating and Customizing Monthly Calendars in Python
Introduction Creating and customizing monthly calendars in Python is a fantastic way to familiarize yourself with Python’s time handling capabilities, as well as an opportunity to delve into…
Python: How to find the day of the week for any date (3 methods)
Introduction Finding the day of the week for any given date is a common problem in software development. Whether you’re generating schedules, reports, or you’re just simply curious…
How to display full year calendars in Python
Introduction Python’s standard library provides an extremely versatile set of modules and methods that allow for efficient and straightforward coding. Among these, the calendar module represents a unique…
Python: Generating a List of ‘datetime’ objects from a ‘calendar’ object
Overview In this tutorial, we delve into the realm of Python programming by focusing on how to generate a list of datetime objects derived from a calendar object….
The maximum number of items a dictionary can hold in Python: Explained with Examples
Intro In the Python programming language, dictionaries are powerful, flexible data structures that allow you to store and retrieve data by using keys. But how much data can…
How to sort a list of tuples in Python (basic and advanced examples)
Overview Sorting is a common operation in programming when you need to organize your data in a particular order. Python, with its rich syntax and powerful data structures,…