dictionary_operations#

Performs some operations on Python dictionaries.

Functions:

get_first_dict_key_for_value(input_dict, value)

Get the first dictionary key that matches a value.

ansys.fluent.core.utils.dictionary_operations.get_first_dict_key_for_value(input_dict, value)#

Get the first dictionary key that matches a value. Typical usage is where the value is known to be unique in the input dictionary.

Parameters:
input_dictdict
valueAny
Returns:
Any

Key associated with the first match.

Raises:
ValueError

If the value is absent from the dictionary.