Calculates and returns a control digit for given list of characters basing on Identity Card Number standards.

def checksum_identity_card_number(characters):
    """
    Calculates and returns a control digit for given list of characters basing on Identity Card Number standards.
    """
    weights_for_check_digit = [7, 3, 1, 0, 7, 3, 1, 7, 3]
    check_digit = 0

    for i in range(3):
        check_digit += weights_for_check_digit[i] * (ord(characters[i]) - 55)

    for i in range(4, 9):
        check_digit += weights_for_check_digit[i] * characters[i]

    check_digit %= 10

    return check_digit