Returns a list of dict() objects, one for each row in a list of lists (table)

def dicts_from_table(table, keys=None):
    """Returns a list of dict() objects, one for each row in a list of lists (table)"""
    lod = []
    for row in table:
        if not keys:
            keys = row
            if not all((k not in (None, '') or bool(k.strip())) for k in keys):
                keys = None
            continue
        lod += [OrderedDict((k, v) for k, v in zip(keys, row))]
    return lod