What are named tuples in Python?
Understand Python's named tuples and start using them in your projects today.
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.
Understand Python's named tuples and start using them in your projects today.
Chunks a list into n
smaller lists.
Finds the value of the last element in the given list that satisfies the provided testing function.
Finds the items that are parity outliers in a given list.
Finds the value of the first element in the given list that satisfies the provided testing function.
Checks if the a value is an empty sequence or collection.
Converts a list of dictionaries into a list of values corresponding to the specified key
.
Chunks a list into smaller lists of a specified size.
Learn how to sort a Python dictionary list using a tuple key.
Calculates the average of a list, after mapping each element to a value using the provided function.
Calculates the difference between two iterables, without filtering duplicate values.
Creates a dictionary with the unique values of a list as keys and their frequencies as the values.
Initializes a list containing the numbers in the specified geometric progression range.
Takes any number of iterable objects or objects with a length property and returns the longest one.
Returns the maximum value of a list, after mapping each element to a value using the provided function.
Returns the minimum value of a list, after mapping each element to a value using the provided function.
Calculates the sum of a list, after mapping each element to a value using the provided function.
Returns the symmetric difference between two iterables, without filtering out duplicate values.
Checks if the provided function returns True
for every element in the list.
Executes the provided function once for each list element, starting from the list's last element.
Returns the n
maximum elements from the provided list.
Returns the n
minimum elements from the provided list.
Learn everything you need to know about Python's slice notation with this handy guide.
Checks if the provided function returns True
for at least one element in the list.