What is the fastest way to know if a value exists in a list (a list with millions of values in it) and what its index is?
I know that all values in the list are uniqu
def check_availability(element, collection: iter): return element in collection
Usage
check_availability('a', [1,2,3,4,'a','b','c'])
I believe this is the fastest way to know if a chosen value is in an array.