ogs5py.tools.tools.find_key_in_list

ogs5py.tools.tools.find_key_in_list(key, key_list)[source]

Look for the right corresponding key in a list.

key has to start with an given key from the list and the longest key will be returned.

Parameters
  • key (str) – Given key.

  • key_list (list of str) – Valid keys to be checked against.

Returns

found_key – The best match. None if nothing was found.

Return type

str or None