import pkg_resources


def get_iban_validation_str(country_code: str) -> list:
    """
    get_iban_validation_str retrieves a string from ibans.txt

    The string containing the IBAN definition for the selected country

    :param country_code: The country alpha-2 code that comes as
        the first 2 letters of an IBAN
    :type country_code: str
    :return: a list containing the IBAN validation data
    :rtype: list
    """
    try:
        stream = pkg_resources.resource_stream(__name__, 'data/ibans.txt')
    except FileNotFoundError:
        return []
    for line in stream:
        line = line.decode('utf-8')
        if country_code == line[0:2]:
            return line.strip().split("|")
    return []