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.
Learn how to sort a Python dictionary list using a tuple key.
Splits values into two groups, based on the result of the given
Finds the value of the first element in the given list that satisfies the provided testing function.
Finds the value of the last element in the given list that satisfies the provided testing function.
Inverts a dictionary with unique hashable values.
Merges two or more dictionaries.
Learn how Python's lists and tuples are different and level up your code today.
Understand Python's named tuples and start using them in your projects today.
Chunks a list into smaller lists of a specified size.
Chunks a list into
n smaller lists.
Finds the items that are parity outliers in a given list.
Converts the values of RGB components to a hexadecimal color code.
Sorts the given dictionary by key.
Returns the sum of the powers of all the numbers from
end (both inclusive).
Converts an integer to its roman numeral representation.
Accepts value between
3999 (both inclusive).