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.
Calculates the sum of a list, after mapping each element to a value using the provided function.
Python, Math · Nov 2, 2020
Checks if the provided function returns True
for every element in the list.
Python, List · Nov 2, 2020
Finds all keys in the provided dictionary that have the given value.
Python, Dictionary · Nov 2, 2020
Executes the provided function once for each list element, starting from the list's last element.
Python, List · Sep 15, 2020
Initializes a 2D list of given width and height and value.
Python, List · Nov 2, 2020
Initializes and fills a list with the specified value.
Python, List · Nov 2, 2020
Finds and returns the list of prime factors of a number.
Python, Math · May 24, 2023
Learn everything you need to know about Python's slice notation with this handy guide.
Python, List · Jun 12, 2021
Checks if the provided function returns True
for at least one element in the list.
Python, List · Nov 2, 2020