import csv


def extractor(filename):
    """Return a tuple containing two lists of the Activity title and
       Activity type(s)

       Args:
       - filename: string of the filename

       Returns:
        Tuple with:
         - Lists of Activity Names
         - Lists of Activity Types
    """
    assert filename.endswith('.csv'), 'File must be a csv file!'

    activity_names = []
    activity_types = []
    with open(filename, 'r') as cas_file:
        cas_reader = csv.reader(cas_file, delimiter=',')
        for row in cas_reader:
            activity_names.append(row[0])
            activity_types.append([int(tp) for tp in row[1:] if int(tp)])
    return (activity_names, activity_types)