def clean_record(rec: list, field_names: list) -> dict:
    """
    Parses the record supplied by the calling function and returns a dictionary
    that can be transformed into a database record.

    :param rec: record extracted from file
    :ptype rec: list
    :param field_names: field names for the record
    :ptype field_names: list
    :rtype: Dictionary of cleaned elements.
    """
    return dict(zip(field_names, [elem.strip('~') for elem in rec]))