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