import pkg_resources


def bank_validation_str(iban: str, bank_code: str) -> list:
    """
    Retrieves a string with the bank information

    :param iban: An iban string
    :type iban: str
    :param bank_code: the bank code
    :type bank_code: str
    :return: A list with the bank information
    :rtype: str
    """
    filename = f'{iban[:6]}.txt'
    location = f'data/banks/{filename}'
    try:
        stream = pkg_resources.resource_stream(__name__, location)
    except FileNotFoundError:
        return []
    for line in stream:
        line = line.decode('utf-8')
        if line.startswith(bank_code + '|'):
            return line.strip().split("|")
    return []