The Python snippet collection contains helper functions for Python 3.6. It includes utilities for most common data types, such as primitivies, lists, dictionaries and date objects.
Checks if a string is an anagram of another string (case-insensitive, ignores spaces, punctuation and special characters).
Python, String · Nov 2, 2020
Learn of the two different way to convert a string to lowercase in Python and understand when you should use each one with this quick guide.
Python, String · Jun 12, 2021
Here are two quick and elegant ways to check if a string is empty in Python.
Python, String · Aug 5, 2022
Pads a string on both sides with the specified character, if it's shorter than the specified length.
Python, String · Oct 3, 2020
Oftentimes you might need to trim whitespace from a string in Python. Learn of three different way to do this in this short guide.
Python, String · Dec 13, 2021
Capitalizes the first letter of every word in a string.
Python, String · Nov 2, 2020
Generates a string with the given string value repeated n
number of times.
Python, String · Nov 2, 2020