import string


def list_characters(start_char='A', end_char='Z', capitalize=True):
    """Generate alphabetical chars, with MS Excel columns names format.

    List can be beyond Z, with AA, AB,... format.

    Parameters
    ----------
    start_char : str
        Char to start from.
    end_char : str
        Last char of list.
    capitalize : bool, optional
        If True, capitalize each char in output list. Default is True.

    Returns
    -------
    List of str
        List of generated chars.

    Raises
    ------
    AssertionError
        Bad data type in either `start_char` or `end_char`.
    """
    assert isinstance(start_char, str) and isinstance(end_char, str),\
        'Input data should be string type'

    # Get list of ascii characters and with 'aa', 'ab', etc.
    base_list = list(string.ascii_lowercase)
    for i in base_list:
        base_list = base_list + [i + c for c in string.ascii_lowercase]

    # Extract chars of interest and capitalize.
    output_list = base_list[base_list.index(start_char.lower()):
                            base_list.index(end_char.lower()) + 1]
    if capitalize is True:
        output_list = [c.upper() for c in output_list]
    return output_list