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.
Inverts a dictionary with non-unique hashable values.
Python, Dictionary · Nov 2, 2020
Combines two or more dictionaries, creating a list of values for each key.
Python, Dictionary · Apr 4, 2021
Groups the elements of a list based on the given function.
Python, List · Nov 2, 2020
Retrieves the value of the nested key indicated by the given selector list from a dictionary or list.
Python, Dictionary · Oct 28, 2020
Maps the values of a list to a dictionary using a function.
Python, List · Nov 2, 2020
Checks if the a value is an empty sequence or collection.
Python, List · Jan 12, 2023
Understand Python's named tuples and start using them in your projects today.
Python, List · Jun 12, 2021
Converts a list of dictionaries into a list of values corresponding to the specified key
.
Python, List · Oct 22, 2020
Learn how to sort a Python dictionary list using a tuple key.
Python, List · Jan 4, 2023
Creates a dictionary with the same keys as the provided dictionary and values generated by running the provided function for each value.
Python, Dictionary · Nov 2, 2020
Finds all keys in the provided dictionary that have the given value.
Python, Dictionary · Nov 2, 2020