D = [(20832049, "hello", 3), (2042449014, "bye", 2), (208414004814, "cya", 3)
I want to make a function with the arguments:
(key, D, hash)
where key represents the element at index[1] at each tuple, D is the dictionary example I gave, and hash is just to hash the key.
My aim is to create a function which finds the value of a tuple if there is a tuple in the list which has the same key or hash(key)
for example, if I did
get("hello", D, hash)
The function would return the value "3"
The list is already sorted
You can use this function: