Find matches in a list or dictionary
Learn how to find the matching values, indexes or keys in a list or dictionary.
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 find the matching values, indexes or keys in a list or dictionary.
Convert a dictionary to a list of tuples and vice versa.
Invert a dictionary with non-unique hashable values.
Understand Python's named tuples and start using them in your projects today.
Learn how to sort a Python dictionary list using a tuple key.
Create a dictionary with the same keys as the provided dictionary and values generated by running the provided function for each value.
Find the key of the minimum or maximum value in a Python dictionary.
Learn the difference between two common ways to access values in Python dictionaries and level up your code today.