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.
Executes the provided function once for each list element, starting from the list's last element.
Python, Math
Initializes a list containing the numbers in the specified range where start
and end
are inclusive and the ratio between two terms is step
.
Python, List
Takes any number of iterable objects or objects with a length property and returns the longest one.
Python, List
Checks if the provided function returns True
for at least one element in the list.
Python, String
Converts a string to camelcase.
Python, Dictionary
Finds all keys in the provided dictionary that have the given value.
Python, List
Initializes a 2D list of given width and height and value.
Python, List
Initializes and fills a list with the specified value.
Python, List
Returns the n
maximum elements from the provided list.
Python, List
Returns the n
minimum elements from the provided list.
Python, String
Converts a string to snake case.
Python, Error
It's generally not a good idea to use bare except
clause in Python, but do you know why?
Python, List
Learn everything you need to know about Python's slice notation with this handy guide.
Python, String
Capitalizes the first letter of a string.
Python, String
Decapitalizes the first letter of a string.