Article
In this guide, we'll take a look at the theory and implementation of the Prototype Design Pattern in Python and when you can benefit from leveraging it. The Object-Oriented Programming (OOP) Paradigm Design Patterns are solutions to common issues, typically present, but not limited to, the Object-Oriented Programming (OOP) architectures....
Juan Hurtado
Working with datetime can be a bit daunting and challenging, and handling datetime in Python is no exception. Python's built-in datetime module introduced us to several classes - date, datetime, time, timezone and timedelta, and several external libraries have spawned to address the issues present in the official module, such...
Geoffery, Joseph
In this guide, we'll take a look at how to remove a character from a string in Python. Strings, and especially user-generated input may contain unwanted characters, such as special characters in a username field we don't want to store. In those cases, we might prefer to remove specific characters...
Naazneen Jatu
Preprocessing data is an often overlooked key step in Machine Learning. In fact - it's as important as the shiny model you want to fit with it. Garbage in - garbage out. You can have the best model crafted for any sort of problem - if you feed it garbage,...
David Landup
There are multiple ways to remove whitespace and other characters from a string in Python. The most commonly known methods are strip(), lstrip(), and rstrip(). Since Python version 3.9, two highly anticipated methods were introduced to remove the prefix or suffix of a string: removeprefix() and removesuffix(). In this...
Sathiya Sarathi Gunasekaran
In this guide, we'll take a look at how to harness the power of iterators using Python's itertools module. The itertools module provides us with an interface for creating fast and memory-efficient iterators. These iterators can be infinite, combinatorial, or terminating. Iterator vs Iterable An Iterator is an intelligent pointer...
Ognjen Jankovic
String manipulation in Python is achieved through a set of built-in methods, which return new strings since they're immutable. In this guide, we will look at methods to strip whitespace (in other languages it's also known as trimming) from strings in Python. Trim Methods - strip() In Python, the stripping...
© 2013-2025 Stack Abuse. All rights reserved.