(letter_case, reverse_letter_case)
return character_pairs
Extract character pairs. Check that two unicode value are also a mapping value of each other.

    :param letter_case: case mappings dictionary which contains the conversions.
    :param reverse_letter_case: Comparable case mapping table which contains the return direction of the conversion.
    :return: A table with character pairs.
Extract character pairs. Check that two unicode value are also a mapping value of each other.
Extract character pairs . Check that two unicode value are also a mapping value of each other .
def extract_character_pairs(letter_case, reverse_letter_case):
    """
    Extract character pairs. Check that two unicode value are also a mapping value of each other.

    :param letter_case: case mappings dictionary which contains the conversions.
    :param reverse_letter_case: Comparable case mapping table which contains the return direction of the conversion.
    :return: A table with character pairs.
    """

    character_pairs = []

    for letter_id in sorted(letter_case.keys()):
        if is_bidirectional_conversion(letter_id, letter_case, reverse_letter_case):
            mapped_value = letter_case[letter_id]
            character_pairs.extend([letter_id, ord(mapped_value)])

            # Remove character pairs from case mapping tables
            del letter_case[letter_id]
            del reverse_letter_case[ord(mapped_value)]

    return character_pairs
def extract_character_pairs ( letter_case , reverse_letter_case ) : character_pairs = [ ] for letter_id in sorted ( letter_case . keys ( ) ) : if is_bidirectional_conversion ( letter_id , letter_case , reverse_letter_case ) : mapped_value = letter_case [ letter_id ] character_pairs . extend ( [ letter_id , ord ( mapped_value ) ] ) # Remove character pairs from case mapping tables del letter_case [ letter_id ] del reverse_letter_case [ ord ( mapped_value ) ] return character_pairs