list_to_dict

Contents

list_to_dict#

eoio.utils.formatters.list_to_dict(test_list, key=None) dict[source]#

Convert a list of tuples into a dictionary, based on ‘GROUP’ and ‘END_GROUP’ values

Parameters:
  • test_list – list of tuples containing (key, value), (“GROUP”, key) and (“END_GROUP”, key) tuples

  • key – key of the dictionary into which subsequent key-value pairs are added

Returns:

Dictionary containing the parsed key-value pairs.