def list2dict ( list_of_options ) : d = { } for key , value in list_of_options : d [ key ] = value return d
list of tuples to list of dictionary python 3
Transforms a list of 2 element tuples to a dictionary
def list2dict(list_of_options):
    """Transforms a list of 2 element tuples to a dictionary"""
    d = {}
    for key, value in list_of_options:
        d[key] = value
    return d