def extract_x_positions(parameter, joining_string="X"):
    """
    find the positions within a string which are X and return as list, including length of list

    :param parameter: str
        the string for interrogation
    :param joining_string: str
        the string of interest whose character positions need to be found
    :return: list
        list of all the indices for where the X character occurs in the string, along with the total length of the list
    """
    return [loc for loc in range(len(parameter)) if parameter[loc] == joining_string] + [
        len(parameter)
    ]